1 11 12 package org.eclipse.jdt.ui.actions; 13 14 import org.eclipse.core.runtime.CoreException; 15 16 import org.eclipse.jface.viewers.IStructuredSelection; 17 18 import org.eclipse.ui.INewWizard; 19 import org.eclipse.ui.PlatformUI; 20 21 import org.eclipse.jdt.ui.wizards.NewInterfaceWizardPage; 22 23 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 24 import org.eclipse.jdt.internal.ui.JavaPluginImages; 25 import org.eclipse.jdt.internal.ui.actions.ActionMessages; 26 import org.eclipse.jdt.internal.ui.wizards.NewInterfaceCreationWizard; 27 28 40 public class OpenNewInterfaceWizardAction extends AbstractOpenWizardAction { 41 42 private NewInterfaceWizardPage fPage; 43 private boolean fOpenEditorOnFinish; 44 45 48 public OpenNewInterfaceWizardAction() { 49 setText(ActionMessages.OpenNewInterfaceWizardAction_text); 50 setDescription(ActionMessages.OpenNewInterfaceWizardAction_description); 51 setToolTipText(ActionMessages.OpenNewInterfaceWizardAction_tooltip); 52 setImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWINT); 53 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_INTERFACE_WIZARD_ACTION); 54 55 fPage= null; 56 fOpenEditorOnFinish= true; 57 } 58 59 64 public void setConfiguredWizardPage(NewInterfaceWizardPage page) { 65 fPage= page; 66 } 67 68 76 public void setOpenEditorOnFinish(boolean openEditorOnFinish) { 77 fOpenEditorOnFinish= openEditorOnFinish; 78 } 79 80 83 protected final INewWizard createWizard() throws CoreException { 84 return new NewInterfaceCreationWizard(fPage, fOpenEditorOnFinish); 85 } 86 } 87 | Popular Tags |