01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.core.text.plugin;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.pde.core.plugin.IPlugin;
14:
15: public class PluginNode extends PluginBaseNode implements IPlugin {
16:
17: private static final long serialVersionUID = 1L;
18:
19: /* (non-Javadoc)
20: * @see org.eclipse.pde.core.plugin.IPlugin#getClassName()
21: */
22: public String getClassName() {
23: return getXMLAttributeValue(P_CLASS_NAME);
24: }
25:
26: /* (non-Javadoc)
27: * @see org.eclipse.pde.core.plugin.IPlugin#setClassName(java.lang.String)
28: */
29: public void setClassName(String className) throws CoreException {
30: setXMLAttribute(P_CLASS_NAME, className);
31: }
32:
33: /* (non-Javadoc)
34: * @see org.eclipse.pde.internal.ui.model.plugin.PluginBaseNode#getSpecificAttributes()
35: */
36: protected String[] getSpecificAttributes() {
37: String classname = getClassName();
38: if (classname != null && classname.trim().length() > 0)
39: return new String[] { " " + P_CLASS_NAME + "=\"" + classname + "\"" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
40: return new String[0];
41: }
42:
43: public boolean hasExtensibleAPI() {
44: return false;
45: }
46:
47: }
|