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.NewClassWizardPage; 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.NewClassCreationWizard; 27 28 39 public class OpenNewClassWizardAction extends AbstractOpenWizardAction { 40 41 private NewClassWizardPage fPage; 42 private boolean fOpenEditorOnFinish; 43 44 47 public OpenNewClassWizardAction() { 48 setText(ActionMessages.OpenNewClassWizardAction_text); 49 setDescription(ActionMessages.OpenNewClassWizardAction_description); 50 setToolTipText(ActionMessages.OpenNewClassWizardAction_tooltip); 51 setImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS); 52 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_CLASS_WIZARD_ACTION); 53 54 fPage= null; 55 fOpenEditorOnFinish= true; 56 } 57 58 63 public void setConfiguredWizardPage(NewClassWizardPage page) { 64 fPage= page; 65 } 66 67 75 public void setOpenEditorOnFinish(boolean openEditorOnFinish) { 76 fOpenEditorOnFinish= openEditorOnFinish; 77 } 78 79 82 protected final INewWizard createWizard() throws CoreException { 83 return new NewClassCreationWizard(fPage, fOpenEditorOnFinish); 84 } 85 } 86 | Popular Tags |