mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
The 'Load Symbole For All' action is added to the 'Shared Libraries' view.
This commit is contained in:
parent
9d443b5a7a
commit
929824408d
9 changed files with 127 additions and 1 deletions
|
@ -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
|
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
|
* RefreshAction.java: new
|
||||||
* AutoRefreshAction.java: new
|
* AutoRefreshAction.java: new
|
||||||
* RefreshMemoryAction.java
|
* RefreshMemoryAction.java
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 354 B |
Binary file not shown.
After Width: | Height: | Size: 135 B |
Binary file not shown.
After Width: | Height: | Size: 241 B |
|
@ -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_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_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_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_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$
|
public static final String IMG_TOOLS_ADD_PRJ_SOURCE_LOCATION = NAME_PREFIX + "addprjsource_wiz.gif"; //$NON-NLS-1$
|
||||||
|
|
|
@ -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 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 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 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
|
// Views
|
||||||
public static final String REGISTERS_VIEW = PREFIX + "registers_view_context"; //$NON-NLS-1$
|
public static final String REGISTERS_VIEW = PREFIX + "registers_view_context"; //$NON-NLS-1$
|
||||||
|
|
|
@ -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() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.ICDebugHelpContextIds;
|
||||||
import org.eclipse.cdt.debug.internal.ui.PixelConverter;
|
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.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.actions.RefreshAction;
|
||||||
import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants;
|
import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants;
|
||||||
import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandler;
|
import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandler;
|
||||||
|
@ -159,6 +160,11 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
|
||||||
setAction( "Refresh", action ); //$NON-NLS-1$
|
setAction( "Refresh", action ); //$NON-NLS-1$
|
||||||
add( (RefreshAction)action );
|
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
|
// set initial content here, as viewer has to be set
|
||||||
setInitialContent();
|
setInitialContent();
|
||||||
}
|
}
|
||||||
|
@ -176,11 +182,15 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
|
||||||
*/
|
*/
|
||||||
protected void fillContextMenu( IMenuManager menu )
|
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.EMPTY_REFRESH_GROUP ) );
|
||||||
menu.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
|
menu.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
|
||||||
|
|
||||||
menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
|
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( "AutoRefresh" ) ); //$NON-NLS-1$
|
||||||
menu.appendToGroup( ICDebugUIConstants.REFRESH_GROUP, getAction( "Refresh" ) ); //$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 )
|
protected void configureToolBar( IToolBarManager tbm )
|
||||||
{
|
{
|
||||||
tbm.add( new Separator( this.getClass().getName() ) );
|
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( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
|
||||||
tbm.add( getAction( "AutoRefresh" ) ); //$NON-NLS-1$
|
tbm.add( getAction( "AutoRefresh" ) ); //$NON-NLS-1$
|
||||||
tbm.add( getAction( "Refresh" ) ); //$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();
|
Object current = getViewer().getInput();
|
||||||
if ( current != null && current.equals( slm ) )
|
if ( current != null && current.equals( slm ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,4 +82,18 @@ public interface ICDebugUIConstants
|
||||||
* </code>).
|
* </code>).
|
||||||
*/
|
*/
|
||||||
public static final String REFRESH_GROUP = "refreshGroup"; //$NON-NLS-1$
|
public static final String REFRESH_GROUP = "refreshGroup"; //$NON-NLS-1$
|
||||||
|
/**
|
||||||
|
* Identifier for an empty group preceeding a
|
||||||
|
* shared libraries group in a menu (value <code>"
|
||||||
|
* emptySharedLibrariesGroup"
|
||||||
|
* </code>).
|
||||||
|
*/
|
||||||
|
public static final String EMPTY_SHARED_LIBRARIES_GROUP = "emptySharedLibrariesGroup"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier for a shared libraries group in a menu (value <code>"
|
||||||
|
* sharedLibrariesGroup"
|
||||||
|
* </code>).
|
||||||
|
*/
|
||||||
|
public static final String SHARED_LIBRARIES_GROUP = "sharedLibrariesGroup"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue