mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Enable/disable the 'Add Globals' action when the 'Expressions' view is initializing.
This commit is contained in:
parent
4169c1bd54
commit
00e4c17321
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-05-13 Mikhail Khodjaiants
|
||||
Enable/disable the 'Add Globals' action when the 'Expressions' view is initializing.
|
||||
* AddGlobalsActionDelegate.java
|
||||
|
||||
2003-05-12 Mikhail Khodjaiants
|
||||
Accumulate the status information when adding multiple globals to the Expression view.
|
||||
* AddGlobalsActionDelegate.java
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.debug.core.DebugPlugin;
|
|||
import org.eclipse.debug.core.model.IDebugElement;
|
||||
import org.eclipse.debug.core.model.IDebugTarget;
|
||||
import org.eclipse.debug.core.model.IExpression;
|
||||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
|
@ -25,6 +26,7 @@ import org.eclipse.jface.viewers.ISelection;
|
|||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.swt.custom.BusyIndicator;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
@ -377,4 +379,15 @@ public class AddGlobalsActionDelegate extends ActionDelegate
|
|||
IExpression expression = CDebugModel.createExpressionForGlobalVariable( target, global.getPath(), global.getName() );
|
||||
DebugPlugin.getDefault().getExpressionManager().addExpression( expression );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void init( IAction action )
|
||||
{
|
||||
super.init( action );
|
||||
Object element = DebugUITools.getDebugContext();
|
||||
setSelection( (element != null ) ? new StructuredSelection( element ) : new StructuredSelection() );
|
||||
update( action );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue