1 11 package org.eclipse.pde.internal.ui.templates.osgi; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.jface.wizard.Wizard; 16 import org.eclipse.jface.wizard.WizardPage; 17 import org.eclipse.pde.core.plugin.IPluginReference; 18 import org.eclipse.pde.internal.ui.templates.IHelpContextIds; 19 import org.eclipse.pde.internal.ui.templates.PDETemplateMessages; 20 import org.eclipse.pde.internal.ui.templates.PDETemplateSection; 21 22 23 public class HelloOSGiTemplate extends PDETemplateSection { 24 25 public static final String KEY_START_MESSAGE = "startMessage"; public static final String KEY_STOP_MESSAGE = "stopMessage"; public static final String KEY_APPLICATION_CLASS = "applicationClass"; 29 public HelloOSGiTemplate() { 30 setPageCount(1); 31 addOption(KEY_START_MESSAGE, PDETemplateMessages.HelloOSGiTemplate_startMessage, PDETemplateMessages.HelloOSGiTemplate_hello, 0); 32 addOption(KEY_STOP_MESSAGE, PDETemplateMessages.HelloOSGiTemplate_stopMessage, PDETemplateMessages.HelloOSGiTemplate_goodbye, 0); 33 } 34 35 public void addPages(Wizard wizard) { 36 WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_RCP_MAIL); 37 page.setTitle(PDETemplateMessages.HelloOSGiTemplate_pageTitle); 38 page.setDescription(PDETemplateMessages.HelloOSGiTemplate_pageDescription); 39 wizard.addPage(page); 40 markPagesAdded(); 41 } 42 43 48 public String getSectionId() { 49 return "helloOSGi"; } 51 52 55 protected void updateModel(IProgressMonitor monitor) throws CoreException { 56 57 } 58 59 62 public String getUsedExtensionPoint() { 63 return null; 64 } 65 66 69 public boolean isDependentOnParentWizard() { 70 return true; 71 } 72 73 76 public int getNumberOfWorkUnits() { 77 return super.getNumberOfWorkUnits() + 1; 78 } 79 80 public IPluginReference[] getDependencies(String schemaVersion) { 81 return new IPluginReference[0]; 82 } 83 } 84 | Popular Tags |