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 public class OSGiSimpleLogServiceTemplate extends PDETemplateSection { 23 24 public static final String START_LOG_MESSAGE = "startLogMessage"; public static final String STOP_LOG_MESSAGE = "stopLogMessage"; 27 public OSGiSimpleLogServiceTemplate() { 28 setPageCount(1); 29 addOption(START_LOG_MESSAGE, 30 PDETemplateMessages.OSGiSimpleLogServiceTemplate_startLogMessage, 31 PDETemplateMessages.OSGiSimpleLogServiceTemplate_logMessage, 32 0); 33 addOption(STOP_LOG_MESSAGE, 34 PDETemplateMessages.OSGiSimpleLogServiceTemplate_stopLogMessage, 35 PDETemplateMessages.OSGiSimpleLogServiceTemplate_logMessage, 36 0); 37 } 38 39 public void addPages(Wizard wizard) { 40 WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_RCP_MAIL); 41 page.setTitle(PDETemplateMessages.OSGiSimpleLogServiceTemplate_pageTitle); 42 page.setDescription(PDETemplateMessages.OSGiSimpleLogServiceTemplate_pageDescription); 43 wizard.addPage(page); 44 markPagesAdded(); 45 } 46 47 52 public String getSectionId() { 53 return "OSGiSimpleLogService"; } 55 56 59 protected void updateModel(IProgressMonitor monitor) throws CoreException { 60 61 } 62 63 66 public String getUsedExtensionPoint() { 67 return null; 68 } 69 70 73 public boolean isDependentOnParentWizard() { 74 return true; 75 } 76 77 80 public int getNumberOfWorkUnits() { 81 return super.getNumberOfWorkUnits() + 1; 82 } 83 84 public IPluginReference[] getDependencies(String schemaVersion) { 85 return new IPluginReference[0]; 86 } 87 88 } 89 | Popular Tags |