KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > templates > osgi > OSGiPreferencesServiceTemplate


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

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 OSGiPreferencesServiceTemplate extends PDETemplateSection {
23     
24     public static final String JavaDoc COLOR = "color"; //$NON-NLS-1$
25

26     public OSGiPreferencesServiceTemplate() {
27         setPageCount(1);
28         addOption(
29                 COLOR,
30                 PDETemplateMessages.OSGiPreferencesServiceTemplate_label,
31                 PDETemplateMessages.OSGiPreferencesServiceTemplate_value,
32                 0);
33     }
34     
35     public void addPages(Wizard wizard) {
36         WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_RCP_MAIL);
37         page.setTitle(PDETemplateMessages.OSGiPreferencesServiceTemplate_pageTitle);
38         page.setDescription(PDETemplateMessages.OSGiPreferencesServiceTemplate_pageDescription);
39         wizard.addPage(page);
40         markPagesAdded();
41     }
42     
43     /*
44      * (non-Javadoc)
45      *
46      * @see org.eclipse.pde.ui.templates.OptionTemplateSection#getSectionId()
47      */

48     public String JavaDoc getSectionId() {
49         return "OSGiPreferencesService"; //$NON-NLS-1$
50
}
51
52     /* (non-Javadoc)
53      * @see org.eclipse.pde.ui.templates.AbstractTemplateSection#updateModel(org.eclipse.core.runtime.IProgressMonitor)
54      */

55     protected void updateModel(IProgressMonitor monitor) throws CoreException {
56         
57     }
58     
59     /* (non-Javadoc)
60      * @see org.eclipse.pde.ui.templates.ITemplateSection#getUsedExtensionPoint()
61      */

62     public String JavaDoc getUsedExtensionPoint() {
63         return null;
64     }
65     
66     /* (non-Javadoc)
67      * @see org.eclipse.pde.ui.templates.BaseOptionTemplateSection#isDependentOnParentWizard()
68      */

69     public boolean isDependentOnParentWizard() {
70         return true;
71     }
72     
73     /* (non-Javadoc)
74      * @see org.eclipse.pde.ui.templates.AbstractTemplateSection#getNumberOfWorkUnits()
75      */

76     public int getNumberOfWorkUnits() {
77         return super.getNumberOfWorkUnits() + 1;
78     }
79     
80     public IPluginReference[] getDependencies(String JavaDoc schemaVersion) {
81         return new IPluginReference[0];
82     }
83 }
84
Popular Tags