Change to openFileInTextEditor to fix ticket issue #650.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / html / InsertHTMLElementAction.java
index 137b8dc..5ca0f4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: InsertHTMLElementAction.java,v 1.2 2005-05-06 00:57:33 stefanbjarni Exp $
+ * $Id: InsertHTMLElementAction.java,v 1.3 2006-10-21 23:18:43 pombredanne Exp $
  * Copyright Narushima Hironori. All rights reserved.
  */
 package net.sourceforge.phpeclipse.wizards.html;
@@ -12,7 +12,6 @@ import org.eclipse.ui.IEditorActionDelegate;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.texteditor.ITextEditor;
 
-
 /**
  * InsertTagAction
  */
@@ -22,25 +21,23 @@ public class InsertHTMLElementAction implements IEditorActionDelegate {
 
        public InsertHTMLElementAction() {
        }
-       
+
        public void setActiveEditor(IAction action, IEditorPart targetEditor) {
-               if(targetEditor instanceof ITextEditor){
-                       this.targetEditor = (ITextEditor)targetEditor;
+               if (targetEditor instanceof ITextEditor) {
+                       this.targetEditor = (ITextEditor) targetEditor;
                }
        }
 
        public void run(IAction action) {
-       
-               WizardDialog wizDialog =
-                       new WizardDialog(
-                               targetEditor.getSite().getShell(),
-                               new EditElementWizard(targetEditor, null) ){
+
+               WizardDialog wizDialog = new WizardDialog(targetEditor.getSite()
+                               .getShell(), new EditElementWizard(targetEditor, null)) {
 
                        protected int getShellStyle() {
                                return super.getShellStyle() | SWT.RESIZE;
                        }
                };
-               
+
                wizDialog.open();
        }