01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.wizards.plugin;
11:
12: import java.util.ArrayList;
13:
14: import org.eclipse.pde.ui.IPluginFieldData;
15: import org.eclipse.pde.ui.templates.ITemplateSection;
16:
17: public class PluginFieldData extends AbstractFieldData implements
18: IPluginFieldData {
19:
20: private String fClassname;
21: private boolean fIsUIPlugin = true;
22: private boolean fDoGenerateClass = true;
23: private boolean fRCPAppPlugin = false;
24: private ArrayList templates = new ArrayList();
25:
26: /* (non-Javadoc)
27: * @see org.eclipse.pde.ui.IPluginFieldData#getClassname()
28: */
29: public String getClassname() {
30: return fClassname;
31: }
32:
33: public void setClassname(String 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
55: .toArray(new ITemplateSection[templates.size()]);
56: }
57:
58: public void setDoGenerateClass(boolean doGenerate) {
59: fDoGenerateClass = doGenerate;
60: }
61:
62: /* (non-Javadoc)
63: * @see org.eclipse.pde.ui.IPluginFieldData#doGenerateClass()
64: */
65: public boolean doGenerateClass() {
66: return fDoGenerateClass;
67: }
68:
69: public void setRCPApplicationPlugin(boolean isRCPAppPlugin) {
70: fRCPAppPlugin = isRCPAppPlugin;
71: }
72:
73: public boolean isRCPApplicationPlugin() {
74: return fRCPAppPlugin;
75: }
76:
77: }
|