Changeset 647
- Timestamp:
- 04/17/08 09:50:49 (8 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
org.cfeclipse.cfml/trunk/src/org/cfeclipse/cfml/editors/actions/AutoCommentAction.java
r2 r647 34 34 import org.eclipse.ui.IEditorActionDelegate; 35 35 import org.eclipse.ui.IEditorPart; 36 import org.eclipse.ui.IWorkbenchWindow; 37 import org.eclipse.ui.IWorkbenchWindowActionDelegate; 36 38 import org.eclipse.ui.texteditor.ITextEditor; 37 39 … … 44 46 * or cf comments in a cfblock. 45 47 */ 46 public class AutoCommentAction extends Encloser implements I EditorActionDelegate {48 public class AutoCommentAction extends Encloser implements IWorkbenchWindowActionDelegate,IEditorActionDelegate { 47 49 48 50 ITextEditor editor = null; … … 115 117 } 116 118 117 public void selectionChanged(IAction action, ISelection selection) {;} 119 public void selectionChanged(IAction action, ISelection selection){ 120 if(editor != null){ 121 setActiveEditor(null, editor.getSite().getPage().getActiveEditor()); 122 } 123 } 124 125 126 public void dispose() { 127 // TODO Auto-generated method stub 128 129 } 130 131 public void init(IWorkbenchWindow window) { 132 IEditorPart activeEditor = window.getActivePage().getActiveEditor(); 133 if(activeEditor instanceof ITextEditor){ 134 editor = (ITextEditor)activeEditor; 135 } 136 137 } 138 118 139 }
