New implementation of the "Refresh" actions for registers and shared libraries.
|
@ -1,3 +1,16 @@
|
||||||
|
2004-06-09 Mikhail Khodjaiants
|
||||||
|
New implementation of the "Refresh" actions for registers and shared libraries.
|
||||||
|
* icons/full/clcl16/auto_refresh_co.gif: new
|
||||||
|
* icons/full/clcl16/refresh_co.gif: new
|
||||||
|
* plugin.properties
|
||||||
|
* plugin.xml
|
||||||
|
* CDebugImages.java
|
||||||
|
* AbstractRefreshActionDelegate.java: new
|
||||||
|
* RefreshRegistersAction.java: new
|
||||||
|
* RefreshSharedLibrariesAction.java: new
|
||||||
|
* SharedLibrariesView.java
|
||||||
|
* Refreshaction.java: removed
|
||||||
|
|
||||||
2004-06-08 Mikhail Khodjaiants
|
2004-06-08 Mikhail Khodjaiants
|
||||||
Warning clean-up.
|
Warning clean-up.
|
||||||
* DebugTextHover.java
|
* DebugTextHover.java
|
||||||
|
|
After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 182 B |
BIN
debug/org.eclipse.cdt.debug.ui/icons/full/clcl16/refresh_co.gif
Normal file
After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 170 B |
|
@ -101,3 +101,6 @@ DisassemblySourceLineColor.label=Disassembly Source Line text color
|
||||||
DisassemblySourceLineColor.description=The color used in the Disassembly view for source lines.
|
DisassemblySourceLineColor.description=The color used in the Disassembly view for source lines.
|
||||||
DisassemblyFontDefinition.label=Disassembly View text font
|
DisassemblyFontDefinition.label=Disassembly View text font
|
||||||
DisassemblyFontDefinition.description=The font used in the Disassembly view.
|
DisassemblyFontDefinition.description=The font used in the Disassembly view.
|
||||||
|
|
||||||
|
RefreshAction.label=Refresh
|
||||||
|
RefreshAction.tooltip=Refresh View's Content
|
|
@ -496,7 +496,7 @@
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
</viewerContribution>
|
</viewerContribution>
|
||||||
<objectContribution
|
<objectContribution
|
||||||
objectClass="org.eclipse.cdt.debug.core.model.ICVariable"
|
objectClass="org.eclipse.cdt.debug.core.model.ICVariable"
|
||||||
id="org.eclipse.cdt.debug.ui.CVariableActions">
|
id="org.eclipse.cdt.debug.ui.CVariableActions">
|
||||||
<menu
|
<menu
|
||||||
|
@ -535,6 +535,21 @@
|
||||||
<viewerContribution
|
<viewerContribution
|
||||||
targetID="org.eclipse.cdt.debug.ui.SharedLibrariesView"
|
targetID="org.eclipse.cdt.debug.ui.SharedLibrariesView"
|
||||||
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPopupActions">
|
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPopupActions">
|
||||||
|
<action
|
||||||
|
helpContextId="refresh_shared_libraries_context"
|
||||||
|
label="%RefreshAction.label"
|
||||||
|
tooltip="%RefreshAction.tooltip"
|
||||||
|
icon="icons/full/elcl16/refresh_co.gif"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction"
|
||||||
|
style="push"
|
||||||
|
menubarPath="refreshGroup"
|
||||||
|
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction">
|
||||||
|
<enablement>
|
||||||
|
<pluginState
|
||||||
|
value="activated"
|
||||||
|
id="org.eclipse.cdt.debug.ui"/>
|
||||||
|
</enablement>
|
||||||
|
</action>
|
||||||
</viewerContribution>
|
</viewerContribution>
|
||||||
<objectContribution
|
<objectContribution
|
||||||
objectClass="org.eclipse.cdt.debug.core.model.ICSharedLibrary"
|
objectClass="org.eclipse.cdt.debug.core.model.ICSharedLibrary"
|
||||||
|
@ -755,6 +770,31 @@
|
||||||
</selection>
|
</selection>
|
||||||
</action>
|
</action>
|
||||||
</viewerContribution>
|
</viewerContribution>
|
||||||
|
<viewerContribution
|
||||||
|
targetID="org.eclipse.debug.ui.RegisterView"
|
||||||
|
id="org.eclipse.debug.ui.registersView.popupMenu">
|
||||||
|
<menu
|
||||||
|
label="%Dummy"
|
||||||
|
id="org.eclipse.cdt.debug.ui.refresh">
|
||||||
|
<separator name="refreshGroup"/>
|
||||||
|
<separator name="emptyRefreshGroup"/>
|
||||||
|
</menu>
|
||||||
|
<action
|
||||||
|
helpContextId="refresh_registers_context"
|
||||||
|
label="%RefreshAction.label"
|
||||||
|
tooltip="%RefreshAction.tooltip"
|
||||||
|
icon="icons/full/elcl16/refresh_co.gif"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshRegistersAction"
|
||||||
|
style="push"
|
||||||
|
menubarPath="refreshGroup"
|
||||||
|
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshRegistersAction">
|
||||||
|
<enablement>
|
||||||
|
<pluginState
|
||||||
|
value="activated"
|
||||||
|
id="org.eclipse.cdt.debug.ui"/>
|
||||||
|
</enablement>
|
||||||
|
</action>
|
||||||
|
</viewerContribution>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.viewActions">
|
point="org.eclipse.ui.viewActions">
|
||||||
|
@ -919,6 +959,54 @@
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
</viewContribution>
|
</viewContribution>
|
||||||
|
<viewContribution
|
||||||
|
targetID="org.eclipse.cdt.debug.ui.SharedLibrariesView"
|
||||||
|
id="org.eclipse.debug.ui.sharedLibrariesView.toolbar">
|
||||||
|
<action
|
||||||
|
helpContextId="refresh_shared_libraries_context"
|
||||||
|
disabledIcon="icons/full/dlcl16/refresh_co.gif"
|
||||||
|
hoverIcon="icons/full/clcl16/refresh_co.gif"
|
||||||
|
toolbarPath="refreshGroup"
|
||||||
|
label="%RefreshAction.label"
|
||||||
|
tooltip="%RefreshAction.tooltip"
|
||||||
|
icon="icons/full/elcl16/refresh_co.gif"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction"
|
||||||
|
style="push"
|
||||||
|
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction">
|
||||||
|
<enablement>
|
||||||
|
<pluginState
|
||||||
|
value="activated"
|
||||||
|
id="org.eclipse.cdt.debug.ui"/>
|
||||||
|
</enablement>
|
||||||
|
</action>
|
||||||
|
</viewContribution>
|
||||||
|
<viewContribution
|
||||||
|
targetID="org.eclipse.debug.ui.RegisterView"
|
||||||
|
id="org.eclipse.debug.ui.registersView.toolbar">
|
||||||
|
<menu
|
||||||
|
label="%Dummy"
|
||||||
|
id="org.eclipse.cdt.debug.ui.refresh">
|
||||||
|
<separator name="refreshGroup"/>
|
||||||
|
<separator name="emptyRefreshGroup"/>
|
||||||
|
</menu>
|
||||||
|
<action
|
||||||
|
helpContextId="refresh_registers_context"
|
||||||
|
disabledIcon="icons/full/dlcl16/refresh_co.gif"
|
||||||
|
hoverIcon="icons/full/clcl16/refresh_co.gif"
|
||||||
|
toolbarPath="refreshGroup"
|
||||||
|
label="%RefreshAction.label"
|
||||||
|
tooltip="%RefreshAction.tooltip"
|
||||||
|
icon="icons/full/elcl16/refresh_co.gif"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshRegistersAction"
|
||||||
|
style="push"
|
||||||
|
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshRegistersAction">
|
||||||
|
<enablement>
|
||||||
|
<pluginState
|
||||||
|
value="activated"
|
||||||
|
id="org.eclipse.cdt.debug.ui"/>
|
||||||
|
</enablement>
|
||||||
|
</action>
|
||||||
|
</viewContribution>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.editorActions">
|
point="org.eclipse.ui.editorActions">
|
||||||
|
|
|
@ -96,8 +96,8 @@ public class CDebugImages
|
||||||
|
|
||||||
public static final String IMG_LCL_TYPE_NAMES = NAME_PREFIX + "tnames_co.gif"; //$NON-NLS-1$
|
public static final String IMG_LCL_TYPE_NAMES = NAME_PREFIX + "tnames_co.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_LCL_CHANGE_REGISTER_VALUE = NAME_PREFIX + "change_reg_value_co.gif"; //$NON-NLS-1$
|
public static final String IMG_LCL_CHANGE_REGISTER_VALUE = NAME_PREFIX + "change_reg_value_co.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_LCL_AUTO_REFRESH = NAME_PREFIX + "autorefresh_mem.gif"; //$NON-NLS-1$
|
public static final String IMG_LCL_AUTO_REFRESH = NAME_PREFIX + "auto_refresh_co.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_LCL_REFRESH = NAME_PREFIX + "refresh_mem.gif"; //$NON-NLS-1$
|
public static final String IMG_LCL_REFRESH = NAME_PREFIX + "refresh_co.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_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$
|
||||||
|
|
|
@ -0,0 +1,128 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||||
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
|
import org.eclipse.core.runtime.MultiStatus;
|
||||||
|
import org.eclipse.debug.core.DebugException;
|
||||||
|
import org.eclipse.debug.internal.ui.DebugUIPlugin;
|
||||||
|
import org.eclipse.debug.ui.IDebugView;
|
||||||
|
import org.eclipse.jface.action.IAction;
|
||||||
|
import org.eclipse.swt.custom.BusyIndicator;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
import org.eclipse.ui.IViewActionDelegate;
|
||||||
|
import org.eclipse.ui.IViewPart;
|
||||||
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.actions.ActionDelegate;
|
||||||
|
import org.eclipse.ui.texteditor.IUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The superclass for all "Refresh" action delegates.
|
||||||
|
*/
|
||||||
|
public abstract class AbstractRefreshActionDelegate extends ActionDelegate implements IViewActionDelegate, IUpdate {
|
||||||
|
|
||||||
|
private IAction fAction;
|
||||||
|
private IDebugView fView;
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
||||||
|
*/
|
||||||
|
public void init( IViewPart view ) {
|
||||||
|
setView( view );
|
||||||
|
if ( getView() != null ) {
|
||||||
|
getView().add( this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
|
||||||
|
*/
|
||||||
|
public void init( IAction action ) {
|
||||||
|
setAction( action );
|
||||||
|
super.init( action );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.actions.ActionDelegate#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
if ( getView() != null )
|
||||||
|
getView().remove( this );
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IDebugView getView() {
|
||||||
|
return fView;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setView( IViewPart view ) {
|
||||||
|
fView = ( view instanceof IDebugView ) ? (IDebugView)view : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.texteditor.IUpdate#update()
|
||||||
|
*/
|
||||||
|
public void update() {
|
||||||
|
IAction action = getAction();
|
||||||
|
if ( getView() != null && action != null ) {
|
||||||
|
ICUpdateManager um = getUpdateManager( getView().getViewer().getInput() );
|
||||||
|
action.setEnabled( ( um != null ) ? um.canUpdate() : false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||||
|
*/
|
||||||
|
public void run( IAction action ) {
|
||||||
|
final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, "", null ); //$NON-NLS-1$
|
||||||
|
BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
doAction();
|
||||||
|
}
|
||||||
|
catch( DebugException e ) {
|
||||||
|
ms.merge( e.getStatus() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
if ( !ms.isOK() ) {
|
||||||
|
IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
|
||||||
|
if ( window != null ) {
|
||||||
|
CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString( "internal.ui.actions.RefreshAction.Unable_to_refresh" ), ms.getChildren()[0] ); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DebugUIPlugin.log( ms );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IAction getAction() {
|
||||||
|
return fAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setAction( IAction action ) {
|
||||||
|
fAction = action;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void doAction() throws DebugException {
|
||||||
|
if ( getView() != null ) {
|
||||||
|
ICUpdateManager um = getUpdateManager( getView().getViewer().getInput() );
|
||||||
|
if ( um != null )
|
||||||
|
um.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract ICUpdateManager getUpdateManager( Object element );
|
||||||
|
}
|
|
@ -1,72 +0,0 @@
|
||||||
/*
|
|
||||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
|
||||||
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.texteditor.IUpdate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enter type comment.
|
|
||||||
*
|
|
||||||
* @since: Feb 10, 2003
|
|
||||||
*/
|
|
||||||
public class RefreshAction extends Action implements IUpdate
|
|
||||||
{
|
|
||||||
private Viewer fViewer = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor for RefreshAction.
|
|
||||||
*/
|
|
||||||
public RefreshAction( Viewer viewer, String text )
|
|
||||||
{
|
|
||||||
super( text );
|
|
||||||
fViewer = viewer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.ui.texteditor.IUpdate#update()
|
|
||||||
*/
|
|
||||||
public void update()
|
|
||||||
{
|
|
||||||
if ( fViewer != null && fViewer.getInput() instanceof IAdaptable )
|
|
||||||
{
|
|
||||||
ICUpdateManager uman = (ICUpdateManager)((IAdaptable)fViewer.getInput()).getAdapter( ICUpdateManager.class );
|
|
||||||
if ( uman != null )
|
|
||||||
{
|
|
||||||
setEnabled( uman.canUpdate() );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setEnabled( false );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.action.IAction#run()
|
|
||||||
*/
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
if ( fViewer != null && fViewer.getInput() instanceof IAdaptable )
|
|
||||||
{
|
|
||||||
ICUpdateManager uman = (ICUpdateManager)((IAdaptable)fViewer.getInput()).getAdapter( ICUpdateManager.class );
|
|
||||||
if ( uman != null )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
uman.update();
|
|
||||||
}
|
|
||||||
catch( DebugException e )
|
|
||||||
{
|
|
||||||
CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.RefreshAction.Unable_to_refresh"), e.getStatus() ); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.ICRegisterManager;
|
||||||
|
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||||
|
import org.eclipse.debug.core.model.IDebugElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A delegate for the "Refresh" action of the Registers view.
|
||||||
|
*/
|
||||||
|
public class RefreshRegistersAction extends AbstractRefreshActionDelegate {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractRefreshActionDelegate#getUpdateManager(java.lang.Object)
|
||||||
|
*/
|
||||||
|
protected ICUpdateManager getUpdateManager( Object element ) {
|
||||||
|
if ( element instanceof IDebugElement ) {
|
||||||
|
return (ICUpdateManager)((IDebugElement)element).getDebugTarget().getAdapter( ICRegisterManager.class );
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
|
||||||
|
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||||
|
import org.eclipse.debug.core.model.IDebugElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A delegate for the "Refresh" action of the Shared Libraries view.
|
||||||
|
*/
|
||||||
|
public class RefreshSharedLibrariesAction extends AbstractRefreshActionDelegate {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.internal.ui.actions.RefreshActionDelegate#getUpdateManager(java.lang.Object)
|
||||||
|
*/
|
||||||
|
protected ICUpdateManager getUpdateManager( Object element ) {
|
||||||
|
if ( element instanceof IDebugElement ) {
|
||||||
|
return (ICUpdateManager)((IDebugElement)element).getDebugTarget().getAdapter( ICSharedLibraryManager.class );
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandler;
|
||||||
import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandlerView;
|
import org.eclipse.cdt.debug.internal.ui.views.AbstractDebugEventHandlerView;
|
||||||
import org.eclipse.cdt.debug.internal.ui.views.IDebugExceptionHandler;
|
import org.eclipse.cdt.debug.internal.ui.views.IDebugExceptionHandler;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
|
import org.eclipse.cdt.debug.ui.ICDebugUIConstants;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
import org.eclipse.debug.core.model.IDebugElement;
|
import org.eclipse.debug.core.model.IDebugElement;
|
||||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||||
|
@ -155,6 +156,8 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
|
||||||
* @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(IMenuManager)
|
* @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(IMenuManager)
|
||||||
*/
|
*/
|
||||||
protected void fillContextMenu( IMenuManager menu ) {
|
protected void fillContextMenu( IMenuManager menu ) {
|
||||||
|
menu.add( new Separator( ICDebugUIConstants.EMPTY_REFRESH_GROUP ) );
|
||||||
|
menu.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
|
||||||
menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
|
menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
|
||||||
updateObjects();
|
updateObjects();
|
||||||
}
|
}
|
||||||
|
@ -163,6 +166,7 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView
|
||||||
* @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(IToolBarManager)
|
* @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(IToolBarManager)
|
||||||
*/
|
*/
|
||||||
protected void configureToolBar( IToolBarManager tbm ) {
|
protected void configureToolBar( IToolBarManager tbm ) {
|
||||||
|
tbm.add( new Separator( ICDebugUIConstants.REFRESH_GROUP ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|