KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > plugin > PluginFieldData


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.wizards.plugin;
12
13 import java.util.ArrayList JavaDoc;
14
15 import org.eclipse.pde.ui.IPluginFieldData;
16 import org.eclipse.pde.ui.templates.ITemplateSection;
17
18 public class PluginFieldData extends AbstractFieldData implements IPluginFieldData {
19     
20     private String JavaDoc fClassname;
21     private boolean fIsUIPlugin = true;
22     private boolean fDoGenerateClass = true;
23     private boolean fRCPAppPlugin = false;
24     private ArrayList JavaDoc templates = new ArrayList JavaDoc();
25     
26     /* (non-Javadoc)
27      * @see org.eclipse.pde.ui.IPluginFieldData#getClassname()
28      */

29     public String JavaDoc getClassname() {
30         return fClassname;
31     }
32     
33     public void setClassname(String JavaDoc classname) {
34         fClassname = classname;
35     }
36     
37     /* (non-Javadoc)
38      * @see org.eclipse.pde.ui.IPluginFieldData#isUIPlugin()
39      */

40     public boolean isUIPlugin() {
41         return fIsUIPlugin;
42     }
43     
44     public void setUIPlugin(boolean isUIPlugin) {
45         fIsUIPlugin = isUIPlugin;
46     }
47     
48     public void addTemplate(ITemplateSection section) {
49         if (!templates.contains(section))
50             templates.add(section);
51     }
52     
53     public ITemplateSection[] getTemplateSections() {
54         return (ITemplateSection[]) templates.toArray(new ITemplateSection[templates.size()]);
55     }
56     
57     public void setDoGenerateClass(boolean doGenerate) {
58         fDoGenerateClass = doGenerate;
59     }
60     
61     /* (non-Javadoc)
62      * @see org.eclipse.pde.ui.IPluginFieldData#doGenerateClass()
63      */

64     public boolean doGenerateClass() {
65         return fDoGenerateClass;
66     }
67     
68     public void setRCPApplicationPlugin(boolean isRCPAppPlugin){
69         fRCPAppPlugin = isRCPAppPlugin;
70     }
71     
72     public boolean isRCPApplicationPlugin(){
73         return fRCPAppPlugin;
74     }
75     
76
77
78
79 }
80
Popular Tags