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 HelloOSGiServiceTemplate extends PDETemplateSection { 24 25 public static final String GREETING = "greeting"; public static final String KEY_APPLICATION_CLASS = "applicationClass"; 28 public HelloOSGiServiceTemplate() { 29 setPageCount(1); 30 addOption(GREETING, PDETemplateMessages.HelloOSGiServiceTemplate_greeting, PDETemplateMessages.HelloOSGiServiceTemplate_howdy, 0); 31 } 32 33 public void addPages(Wizard wizard) { 34 WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_RCP_MAIL); 35 page.setTitle(PDETemplateMessages.HelloOSGiServiceTemplate_pageTitle); 36 page.setDescription(PDETemplateMessages.HelloOSGiServiceTemplate_pageDescription); 37 wizard.addPage(page); 38 markPagesAdded(); 39 } 40 41 46 public String getSectionId() { 47 return "helloOSGiService"; } 49 50 53 protected void updateModel(IProgressMonitor monitor) throws CoreException { 54 55 } 56 57 60 public String getUsedExtensionPoint() { 61 return null; 62 } 63 64 67 public boolean isDependentOnParentWizard() { 68 return true; 69 } 70 71 74 public int getNumberOfWorkUnits() { 75 return super.getNumberOfWorkUnits() + 1; 76 } 77 78 public IPluginReference[] getDependencies(String schemaVersion) { 79 return new IPluginReference[0]; 80 } 81 } 82 | Popular Tags |