1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

Enable/disable the 'Add Expression' action when target selection changed.

This commit is contained in:
Mikhail Khodjaiants 2002-09-18 21:29:55 +00:00
parent 80ad51d3a9
commit 046d4285b4

View file

@ -205,6 +205,15 @@ public class AddExpressionActionDelegate implements IWorkbenchWindowActionDelega
public void setActiveEditor( IAction action, IEditorPart targetEditor )
{
setAction( action );
if ( getWorkbenchWindow() == null )
{
IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow();
setWorkbenchWindow( window );
if ( window != null )
{
window.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
}
}
setTargetPart( targetEditor );
initializeDebugTarget();
update();