net.sf.ant4eclipse.model.pdesupport.plugin
Class PluginDescriptorParser

java.lang.Object
  extended by net.sf.ant4eclipse.model.pdesupport.plugin.PluginDescriptorParser

public final class PluginDescriptorParser
extends java.lang.Object

Implements a parser which parses any kind of plugins (jar files, directories or eclipse plugin projects in a workspace).


Field Summary
static java.lang.String FRAGMENT_XML_PATH
          FRAGMENT_XML_FILE_PATH
static java.lang.String MANIFEST_PATH
          MANIFEST_FILE_PATH
static java.lang.String PLUGIN_PROPERTIES_FILE_PATH
          PLUGIN_PROPERTIES_FILE_PATH
static java.lang.String PLUGIN_XML_PATH
          PLUGIN_XML_FILE_PATH
 
Constructor Summary
PluginDescriptorParser()
           
 
Method Summary
static PluginDescriptor parseEclipseProject(EclipseProject project)
          Parses the manifest for the given eclipse project.
static PluginDescriptor parsePlugin(java.io.File file)
          Parses the plugin which is located using the supplied handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANIFEST_PATH

public static final java.lang.String MANIFEST_PATH
MANIFEST_FILE_PATH


PLUGIN_XML_PATH

public static final java.lang.String PLUGIN_XML_PATH
PLUGIN_XML_FILE_PATH

See Also:
Constant Field Values

PLUGIN_PROPERTIES_FILE_PATH

public static final java.lang.String PLUGIN_PROPERTIES_FILE_PATH
PLUGIN_PROPERTIES_FILE_PATH

See Also:
Constant Field Values

FRAGMENT_XML_PATH

public static final java.lang.String FRAGMENT_XML_PATH
FRAGMENT_XML_FILE_PATH

See Also:
Constant Field Values
Constructor Detail

PluginDescriptorParser

public PluginDescriptorParser()
Method Detail

parseEclipseProject

public static PluginDescriptor parseEclipseProject(EclipseProject project)
                                            throws FileParserException
Parses the manifest for the given eclipse project. The project must have the PluginProjectRole (project.hasRole(PluginProjectRole.class) has to be true).

Parameters:
project -
Returns:
A PluginDescriptor instance which provides classpath and other administrational information. A null value indicates that it can be ignored (fragment which is referred by a plugin).
Throws:
FileParserException

parsePlugin

public static PluginDescriptor parsePlugin(java.io.File file)
                                    throws FileParserException
Parses the plugin which is located using the supplied handle.

Parameters:
file - The plugin which potentially refers to a plugin.
Returns:
A PluginDescriptor providing the necessary information. null in case the File doesn't refer to a valid plugin.
Throws:
FileParserException - Parsing the plugin failed for some reason.