KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > text > plugin > PluginNode


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.core.text.plugin;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.pde.core.plugin.IPlugin;
15
16 public class PluginNode extends PluginBaseNode implements IPlugin {
17
18     private static final long serialVersionUID = 1L;
19
20     /* (non-Javadoc)
21      * @see org.eclipse.pde.core.plugin.IPlugin#getClassName()
22      */

23     public String JavaDoc getClassName() {
24         return getXMLAttributeValue(P_CLASS_NAME);
25     }
26     /* (non-Javadoc)
27      * @see org.eclipse.pde.core.plugin.IPlugin#setClassName(java.lang.String)
28      */

29     public void setClassName(String JavaDoc 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 JavaDoc[] getSpecificAttributes() {
37         String JavaDoc classname = getClassName();
38         if (classname != null && classname.trim().length() > 0)
39             return new String JavaDoc[] {" " + P_CLASS_NAME + "=\"" + classname + "\""}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
40
return new String JavaDoc[0];
41     }
42     public boolean hasExtensibleAPI() {
43         return false;
44     }
45     
46 }
47
Popular Tags