Changeset 366
- Timestamp:
- 09/16/08 17:48:55 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
jasko.tim.lisp/src/jasko/tim/lisp/editors/actions/FindDefinitionAction.java
r327 r366 7 7 import java.util.*; 8 8 9 import org.eclipse.jface.action.IAction; 9 10 import org.eclipse.jface.dialogs.Dialog; 10 11 import org.eclipse.swt.SWT; 11 12 import org.eclipse.swt.widgets.MessageBox; 12 13 import org.eclipse.swt.widgets.Shell; 14 import org.eclipse.ui.IEditorPart; 13 15 import org.eclipse.ui.PlatformUI; 14 16 … … 16 18 17 19 private Shell shell; 20 21 public FindDefinitionAction(){} 18 22 19 23 public FindDefinitionAction(ILispEditor editor) { … … 30 34 31 35 } 36 37 public void setActiveEditor(IAction action, IEditorPart targetEditor) { 38 editor = (ILispEditor)targetEditor; 39 shell = null; 40 if( editor == null ){ 41 shell = editor.getTextWidget().getShell(); 42 } else { 43 shell = PlatformUI.getWorkbench().getDisplay().getActiveShell(); 44 } 45 } 46 32 47 33 48 private class OpenDefinitionRunnable extends SwankRunnable { … … 38 53 } 39 54 public void run() { 40 shell = null;41 if( editor == null ){42 shell = editor.getTextWidget().getShell();43 } else {44 shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();45 }46 55 LispNode guts = result.getf(":return").getf(":ok"); 47 56 ArrayList<String> names = new ArrayList<String>(guts.params.size());
