mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fix for bug 69184: Activate the Expression view when expression is added.
This commit is contained in:
parent
0448368a27
commit
7ff44b1055
2 changed files with 24 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-11-18 Mikhail Khodjaiants
|
||||
Fix for bug 69184: Activate the Expression view when expression is added.
|
||||
* AddExpressionEditorActionDelegate.java
|
||||
|
||||
2004-11-15 Mikhail Khodjaiants
|
||||
Fix for bug 78604: Disassembly causes Java exception when disassembling beyond fn(?).
|
||||
* DisassemblyEditorInput.java
|
||||
|
|
|
@ -15,7 +15,9 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
import org.eclipse.debug.core.DebugPlugin;
|
||||
import org.eclipse.debug.core.model.IDebugElement;
|
||||
import org.eclipse.debug.core.model.IWatchExpression;
|
||||
import org.eclipse.debug.internal.ui.DebugUIPlugin;
|
||||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.text.ITextSelection;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
|
@ -24,7 +26,10 @@ import org.eclipse.jface.window.Window;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorActionDelegate;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.actions.ActionDelegate;
|
||||
|
||||
|
||||
|
@ -56,6 +61,7 @@ public class AddExpressionEditorActionDelegate extends ActionDelegate implements
|
|||
if ( dlg.open() != Window.OK )
|
||||
return;
|
||||
createExpression( dlg.getExpression() );
|
||||
activateExpressionView();
|
||||
}
|
||||
|
||||
private String getSelectedText() {
|
||||
|
@ -88,4 +94,18 @@ public class AddExpressionEditorActionDelegate extends ActionDelegate implements
|
|||
protected Shell getShell() {
|
||||
return ( getEditorPart() != null ) ? getEditorPart().getSite().getShell() : CDebugUIPlugin.getActiveWorkbenchShell();
|
||||
}
|
||||
|
||||
private void activateExpressionView() {
|
||||
IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
|
||||
if ( window != null ) {
|
||||
IWorkbenchPage page = window.getActivePage();
|
||||
if ( page != null ) {
|
||||
try {
|
||||
page.showView( IDebugUIConstants.ID_EXPRESSION_VIEW );
|
||||
}
|
||||
catch( PartInitException e ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue