2 * $Id: InsertHTMLElementAction.java,v 1.2 2005-05-06 00:57:33 stefanbjarni Exp $
3 * Copyright Narushima Hironori. All rights reserved.
5 package net.sourceforge.phpeclipse.wizards.html;
7 import org.eclipse.jface.action.IAction;
8 import org.eclipse.jface.viewers.ISelection;
9 import org.eclipse.jface.wizard.WizardDialog;
10 import org.eclipse.swt.SWT;
11 import org.eclipse.ui.IEditorActionDelegate;
12 import org.eclipse.ui.IEditorPart;
13 import org.eclipse.ui.texteditor.ITextEditor;
19 public class InsertHTMLElementAction implements IEditorActionDelegate {
21 ITextEditor targetEditor = null;
23 public InsertHTMLElementAction() {
26 public void setActiveEditor(IAction action, IEditorPart targetEditor) {
27 if(targetEditor instanceof ITextEditor){
28 this.targetEditor = (ITextEditor)targetEditor;
32 public void run(IAction action) {
34 WizardDialog wizDialog =
36 targetEditor.getSite().getShell(),
37 new EditElementWizard(targetEditor, null) ){
39 protected int getShellStyle() {
40 return super.getShellStyle() | SWT.RESIZE;
47 public void selectionChanged(IAction action, ISelection selection) {