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:
parent
80ad51d3a9
commit
046d4285b4
1 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue