diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index d0ef9b518ea..eb1e8c2b490 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,5 +1,16 @@
+2003-02-11 Mikhail Khodjaiants
+ The 'Load Symbole For All' action is added to the 'Shared Libraries' view
+ * CDebugImages.java
+ * ICDebugHelpContextIds.java
+ * LoadSymbolsForAllAction.java: new
+ * SharedLibrariesView.java
+ * ICDebugUIConstants.java
+ * icons/full/clcl16/load_all_symbols_co.gif: new
+ * icons/full/dlcl16/load_all_symbols_co.gif: new
+ * icons/full/elcl16/load_all_symbols_co.gif: new
+
2003-02-10 Mikhail Khodjaiants
- The 'Auto-Refresh' and 'Refresh' actions added to the 'Shared Libraries' view.
+ The 'Auto-Refresh' and 'Refresh' actions are added to the 'Shared Libraries' view.
* RefreshAction.java: new
* AutoRefreshAction.java: new
* RefreshMemoryAction.java
diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/clcl16/load_all_symbols_co.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/clcl16/load_all_symbols_co.gif
new file mode 100644
index 00000000000..b659df9d645
Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/full/clcl16/load_all_symbols_co.gif differ
diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/dlcl16/load_all_symbols_co.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/dlcl16/load_all_symbols_co.gif
new file mode 100644
index 00000000000..0e062888d77
Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/full/dlcl16/load_all_symbols_co.gif differ
diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/elcl16/load_all_symbols_co.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/elcl16/load_all_symbols_co.gif
new file mode 100644
index 00000000000..22e5ab675a5
Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/full/elcl16/load_all_symbols_co.gif differ
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java
index 350b20088c9..807ec419ab0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java
@@ -76,6 +76,7 @@ public class CDebugImages
public static final String IMG_LCL_MEMORY_SAVE = NAME_PREFIX + "memory_update.gif"; //$NON-NLS-1$
public static final String IMG_LCL_MEMORY_CLEAR = NAME_PREFIX + "memory_clear.gif"; //$NON-NLS-1$
public static final String IMG_LCL_SHOW_ASCII = NAME_PREFIX + "show_ascii.gif"; //$NON-NLS-1$
+ public static final String IMG_LCL_LOAD_ALL_SYMBOLS = NAME_PREFIX + "load_all_symbols_co.gif"; //$NON-NLS-1$
public static final String IMG_TOOLS_ADD_DIR_SOURCE_LOCATION = NAME_PREFIX + "adddirsource_wiz.gif"; //$NON-NLS-1$
public static final String IMG_TOOLS_ADD_PRJ_SOURCE_LOCATION = NAME_PREFIX + "addprjsource_wiz.gif"; //$NON-NLS-1$
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ICDebugHelpContextIds.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ICDebugHelpContextIds.java
index a46e103e300..29903da7169 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ICDebugHelpContextIds.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ICDebugHelpContextIds.java
@@ -32,6 +32,7 @@ public interface ICDebugHelpContextIds
public static final String MEMORY_SHOW_ASCII_ACTION = PREFIX + "memory_show_ascii_action_context"; //$NON-NLS-1$
public static final String REFRESH_SHARED_LIBRARIES_ACTION = PREFIX + "refresh_shared_libraries_action_context"; //$NON-NLS-1$
public static final String AUTO_REFRESH_SHARED_LIBRARIES_ACTION = PREFIX + "auto_refresh_shared_libraries_action_context"; //$NON-NLS-1$
+ public static final String LOAD_SYMBOLS_FOR_ALL = PREFIX + "load_symbols_for_all_action_context"; //$NON-NLS-1$
// Views
public static final String REGISTERS_VIEW = PREFIX + "registers_view_context"; //$NON-NLS-1$
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java
new file mode 100644
index 00000000000..f7f460b1926
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java
@@ -0,0 +1,80 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ *
+ */
+package org.eclipse.cdt.debug.internal.ui.actions;
+
+import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
+import org.eclipse.cdt.debug.core.model.ICDebugTarget;
+import org.eclipse.cdt.debug.internal.ui.CDebugImages;
+import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
+import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.ui.texteditor.IUpdate;
+
+/**
+ * Enter type comment.
+ *
+ * @since: Feb 11, 2003
+ */
+public class LoadSymbolsForAllAction extends Action implements IUpdate
+{
+ private Viewer fViewer = null;
+
+ /**
+ * Constructor for LoadSymbolsForAllAction.
+ */
+ public LoadSymbolsForAllAction( Viewer viewer )
+ {
+ super( "Load Symbols For All" );
+ fViewer = viewer;
+ CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_LOAD_ALL_SYMBOLS );
+ setDescription( "Load symbols for all shared libraries." );
+ setToolTipText( "Load Symbols For All" );
+ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.LOAD_SYMBOLS_FOR_ALL );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ */
+ public void update()
+ {
+ if ( fViewer != null && fViewer.getInput() instanceof IAdaptable )
+ {
+ ICDebugTarget target = (ICDebugTarget)((IAdaptable)fViewer.getInput()).getAdapter( ICDebugTarget.class );
+ if ( target != null )
+ {
+ setEnabled( target.isSuspended() );
+ return;
+ }
+ }
+ setEnabled( false );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run()
+ {
+ if ( fViewer != null && fViewer.getInput() instanceof IAdaptable )
+ {
+ ICSharedLibraryManager slm = (ICSharedLibraryManager)((IAdaptable)fViewer.getInput()).getAdapter( ICSharedLibraryManager.class );
+ if ( slm != null )
+ {
+ try
+ {
+ slm.loadSymbolsForAll();
+ }
+ catch( DebugException e )
+ {
+ CDebugUIPlugin.errorDialog( "Unable to load symbols.", e.getStatus() );
+ }
+ }
+ }
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java
index e51b0a91810..7956cfa8e89 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java
@@ -13,6 +13,7 @@ import org.eclipse.cdt.debug.internal.ui.CDebugImages;
import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
import org.eclipse.cdt.debug.internal.ui.PixelConverter;
import org.eclipse.cdt.debug.internal.ui.actions.AutoRefreshAction;
+import org.eclipse.cdt.debug.internal.ui.actions.LoadSymbolsForAllAction;
import org.eclipse.cdt.debug.internal.ui.actions.RefreshAction;
import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants;
import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandler;
@@ -159,6 +160,11 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
setAction( "Refresh", action ); //$NON-NLS-1$
add( (RefreshAction)action );
+ action = new LoadSymbolsForAllAction( getViewer() );
+ action.setEnabled( false );
+ setAction( "LoadSymbolsForAll", action ); //$NON-NLS-1$
+ add( (LoadSymbolsForAllAction)action );
+
// set initial content here, as viewer has to be set
setInitialContent();
}
@@ -176,11 +182,15 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
*/
protected void fillContextMenu( IMenuManager menu )
{
+ menu.add( new Separator( ICDebugUIConstants.EMPTY_SHARED_LIBRARIES_GROUP ) );
+ menu.add( new Separator( ICDebugUIConstants.SHARED_LIBRARIES_GROUP ) );
+
menu.add( new Separator( ICDebugUIConstants.EMPTY_REFRESH_GROUP ) );
menu.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+ menu.appendToGroup( ICDebugUIConstants.SHARED_LIBRARIES_GROUP, getAction( "LoadSymbolsForAll" ) ); //$NON-NLS-1$
menu.appendToGroup( ICDebugUIConstants.REFRESH_GROUP, getAction( "AutoRefresh" ) ); //$NON-NLS-1$
menu.appendToGroup( ICDebugUIConstants.REFRESH_GROUP, getAction( "Refresh" ) ); //$NON-NLS-1$
}
@@ -191,6 +201,10 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
protected void configureToolBar( IToolBarManager tbm )
{
tbm.add( new Separator( this.getClass().getName() ) );
+
+ tbm.add( new Separator( ICDebugUIConstants.SHARED_LIBRARIES_GROUP ) );
+ tbm.add( getAction( "LoadSymbolsForAll" ) ); //$NON-NLS-1$
+
tbm.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
tbm.add( getAction( "AutoRefresh" ) ); //$NON-NLS-1$
tbm.add( getAction( "Refresh" ) ); //$NON-NLS-1$
@@ -233,6 +247,11 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
}
}
+ if ( getViewer() == null )
+ {
+ return;
+ }
+
Object current = getViewer().getInput();
if ( current != null && current.equals( slm ) )
{
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
index 5d057223aeb..a2c80022c9e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
@@ -82,4 +82,18 @@ public interface ICDebugUIConstants
* ).
*/
public static final String REFRESH_GROUP = "refreshGroup"; //$NON-NLS-1$
+ /**
+ * Identifier for an empty group preceeding a
+ * shared libraries group in a menu (value "
+ * emptySharedLibrariesGroup"
+ *
).
+ */
+ public static final String EMPTY_SHARED_LIBRARIES_GROUP = "emptySharedLibrariesGroup"; //$NON-NLS-1$
+
+ /**
+ * Identifier for a shared libraries group in a menu (value "
+ * sharedLibrariesGroup"
+ *
).
+ */
+ public static final String SHARED_LIBRARIES_GROUP = "sharedLibrariesGroup"; //$NON-NLS-1$
}