mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +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 )
|
public void setActiveEditor( IAction action, IEditorPart targetEditor )
|
||||||
{
|
{
|
||||||
setAction( action );
|
setAction( action );
|
||||||
|
if ( getWorkbenchWindow() == null )
|
||||||
|
{
|
||||||
|
IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow();
|
||||||
|
setWorkbenchWindow( window );
|
||||||
|
if ( window != null )
|
||||||
|
{
|
||||||
|
window.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
setTargetPart( targetEditor );
|
setTargetPart( targetEditor );
|
||||||
initializeDebugTarget();
|
initializeDebugTarget();
|
||||||
update();
|
update();
|
||||||
|
|
Loading…
Add table
Reference in a new issue