2  * $Id: InsertHTMLElementAction.java,v 1.1 2004-10-05 20:51:57 jsurfer Exp $
 
   3  * Copyright Narushima Hironori. All rights reserved.
 
   5 package net.sourceforge.phpeclipse.wizards.html;
 
   7 import net.sourceforge.phpeclipse.wizards.html.EditElementWizard;
 
   9 import org.eclipse.jface.action.IAction;
 
  10 import org.eclipse.jface.viewers.ISelection;
 
  11 import org.eclipse.jface.wizard.WizardDialog;
 
  12 import org.eclipse.swt.SWT;
 
  13 import org.eclipse.ui.*;
 
  14 import org.eclipse.ui.texteditor.ITextEditor;
 
  20 public class InsertHTMLElementAction implements IEditorActionDelegate {
 
  22         ITextEditor targetEditor = null;
 
  24         public InsertHTMLElementAction() {
 
  27         public void setActiveEditor(IAction action, IEditorPart targetEditor) {
 
  28                 if(targetEditor instanceof ITextEditor){
 
  29                         this.targetEditor = (ITextEditor)targetEditor;
 
  33         public void run(IAction action) {
 
  35                 WizardDialog wizDialog =
 
  37                                 targetEditor.getSite().getShell(),
 
  38                                 new EditElementWizard(targetEditor, null) ){
 
  40                         protected int getShellStyle() {
 
  41                                 return super.getShellStyle() | SWT.RESIZE;
 
  48         public void selectionChanged(IAction action, ISelection selection) {