1 11 package org.eclipse.pde.internal.ui.wizards.extension; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.pde.core.plugin.IPluginExtensionPoint; 15 import org.eclipse.pde.core.plugin.IPluginModelBase; 16 import org.eclipse.pde.internal.ui.PDEPlugin; 17 import org.eclipse.pde.internal.ui.PDEPluginImages; 18 import org.eclipse.pde.internal.ui.PDEUIMessages; 19 import org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor; 20 import org.eclipse.pde.internal.ui.wizards.NewWizard; 21 22 public class NewExtensionPointWizard extends NewWizard { 23 private NewExtensionPointMainPage mainPage; 24 private IPluginModelBase model; 25 private IProject project; 26 private IPluginExtensionPoint point; 27 private ManifestEditor editor; 28 public NewExtensionPointWizard(IProject project, IPluginModelBase model, ManifestEditor editor) { 29 this(project, model, (IPluginExtensionPoint)null); 30 this.editor = editor; 31 } 32 33 public NewExtensionPointWizard(IProject project, IPluginModelBase model, IPluginExtensionPoint point){ 34 initialize(); 35 this.project = project; 36 this.model = model; 37 this.point = point; 38 } 39 40 public void initialize(){ 41 setDialogSettings(PDEPlugin.getDefault().getDialogSettings()); 42 setDefaultPageImageDescriptor(PDEPluginImages.DESC_NEWEXP_WIZ); 43 setWindowTitle(PDEUIMessages.NewExtensionPointWizard_wtitle); 44 setNeedsProgressMonitor(true); 45 } 46 47 public void addPages() { 48 mainPage = new NewExtensionPointMainPage(project, model, point); 49 addPage(mainPage); 50 } 51 52 public boolean performFinish() { 53 if (editor!=null) 54 editor.ensurePluginContextPresence(); 55 return mainPage.finish(); 56 } 57 } 58 | Popular Tags |