1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

The 'load symbols' actions support in ICSharedLibraryManager.

This commit is contained in:
Mikhail Khodjaiants 2003-02-11 19:16:30 +00:00
parent e892e5418f
commit 9d443b5a7a
3 changed files with 58 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-02-11 Mikhail Khodjaiants
The 'load symbols' actions support in ICSharedLibraryManager.
* ICSharedLibraryManager.java
* CSharedLibraryManager.java
2003-02-10 Mikhail Khodjaiants 2003-02-10 Mikhail Khodjaiants
Support of update ('Refresh', 'Auto-Refresh) actions. Support of update ('Refresh', 'Auto-Refresh) actions.
* ICUpdateManager.java: new * ICUpdateManager.java: new

View file

@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.core;
import org.eclipse.cdt.debug.core.model.ICSharedLibrary; import org.eclipse.cdt.debug.core.model.ICSharedLibrary;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugException;
/** /**
* Enter type comment. * Enter type comment.
@ -17,5 +18,9 @@ public interface ICSharedLibraryManager extends ICUpdateManager, IAdaptable
{ {
ICSharedLibrary[] getSharedLibraries(); ICSharedLibrary[] getSharedLibraries();
void loadSymbolsForAll() throws DebugException;
void loadSymbols( ICSharedLibrary[] libraries ) throws DebugException;
void dispose(); void dispose();
} }

View file

@ -13,6 +13,7 @@ import org.eclipse.cdt.debug.core.ICUpdateManager;
import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager; import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary; import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
import org.eclipse.cdt.debug.core.model.ICDebugTarget;
import org.eclipse.cdt.debug.core.model.ICSharedLibrary; import org.eclipse.cdt.debug.core.model.ICSharedLibrary;
import org.eclipse.cdt.debug.internal.core.model.CDebugTarget; import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
import org.eclipse.cdt.debug.internal.core.model.CSharedLibrary; import org.eclipse.cdt.debug.internal.core.model.CSharedLibrary;
@ -118,6 +119,10 @@ public class CSharedLibraryManager implements ICSharedLibraryManager
{ {
return fDebugTarget; return fDebugTarget;
} }
if ( adapter.equals( ICDebugTarget.class ) )
{
return fDebugTarget;
}
return null; return null;
} }
@ -204,4 +209,47 @@ public class CSharedLibraryManager implements ICSharedLibraryManager
} }
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.ICSharedLibraryManager#loadSymbols(org.eclipse.cdt.debug.core.model.ICSharedLibrary)
*/
public void loadSymbols( ICSharedLibrary[] libraries ) throws DebugException
{
ICDISharedLibraryManager slm = getCDIManager();
if ( slm != null )
{
ArrayList cdiLibs = new ArrayList( libraries.length );
for ( int i = 0; i < libraries.length; ++i )
{
cdiLibs.add( ((CSharedLibrary)libraries[i]).getCDISharedLibrary() );
}
try
{
slm.loadSymbols( (ICDISharedLibrary[])cdiLibs.toArray( new ICDISharedLibrary[cdiLibs.size()] ) );
}
catch( CDIException e )
{
((CDebugTarget)getDebugTarget()).targetRequestFailed( e.toString(), null );
}
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.ICSharedLibraryManager#loadSymbolsForAll()
*/
public void loadSymbolsForAll() throws DebugException
{
ICDISharedLibraryManager slm = getCDIManager();
if ( slm != null )
{
try
{
slm.loadSymbols();
}
catch( CDIException e )
{
((CDebugTarget)getDebugTarget()).targetRequestFailed( e.toString(), null );
}
}
}
} }