com.ibm.lpex.alef
Class LpexPlugin

java.lang.Object
  |
  +--org.eclipse.core.runtime.Plugin
        |
        +--com.ibm.lpex.alef.LpexPlugin

public class LpexPlugin
extends org.eclipse.core.runtime.Plugin

Plugin runtime class for LPEX.

A plugin usually extends the startup() and shutdown() methods in order to react to life cycle requests automatically issued by the Eclipse platform.


Constructor Summary
LpexPlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
          Constructs an LPEX plugin runtime object for the given plugin descriptor.
 
Method Summary
static LpexPlugin getDefault()
          Return an instance of this plugin.
static java.util.jar.JarFile getLpexJar()
          Get access to the LPEX jar file.
static java.util.ResourceBundle getResourceBundle()
          Retrieve the resource bundle for this plugin.
static java.lang.String getResourceLpexString(java.lang.String key)
          Retrieve from the LpexPlugin resource bundle the string with the specified key.
static java.lang.String getResourceLpexString(java.lang.String key, java.lang.String arg)
          Retrieve from the LpexPlugin resource bundle the string with the specified key and a single substitution argument.
static java.lang.String getResourceString(java.lang.String key)
          Retrieve a string from the LpexPlugin resource bundle.
 void startup()
          Starts up the LPEX plugin.
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, getDescriptor, getLog, getStateLocation, isDebugging, openStream, openStream, setDebugging, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LpexPlugin

public LpexPlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
Constructs an LPEX plugin runtime object for the given plugin descriptor.

Instances of plugin runtime classes are automatically created by the Eclipse platform in the course of plugin activation.

Parameters:
descriptor - the plugin descriptor (information about the plugin obtained from its manifest file, plugin.xml)
Method Detail

getDefault

public static LpexPlugin getDefault()
Return an instance of this plugin. Eclipse-style static convenience method to gain access to a plugin's runtime object, so code in other parts of the plugin implementation without direct access to the plugin runtime object can easily obtain a reference to it, and hence to any plugin-wide resources recorded on it.
Returns:
an initialized instance of LpexPlugin

getResourceBundle

public static java.util.ResourceBundle getResourceBundle()
Retrieve the resource bundle for this plugin. The resource file of the LPEX plugin is com.ibm.lpex.alef.PluginResources.properties.

getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Retrieve a string from the LpexPlugin resource bundle.
Returns:
the key if not found
See Also:
getResourceLpexString(String), getResourceLpexString(String,String)

getResourceLpexString

public static java.lang.String getResourceLpexString(java.lang.String key)
Retrieve from the LpexPlugin resource bundle the string with the specified key. This method uses class LpexResources to retrieve the value, which assumes certain syntax rules for the text in the resource.
Returns:
the key if not found
See Also:
LpexResources, getResourceString(String), getResourceLpexString(String,String)

getResourceLpexString

public static java.lang.String getResourceLpexString(java.lang.String key,
                                                     java.lang.String arg)
Retrieve from the LpexPlugin resource bundle the string with the specified key and a single substitution argument. This method uses class LpexResources to retrieve the value, which assumes certain syntax rules for the text in the resource.
Returns:
the key if not found
See Also:
LpexResources, getResourceString(String), getResourceLpexString(String)

startup

public void startup()
             throws org.eclipse.core.runtime.CoreException
Starts up the LPEX plugin. This method is automatically invoked by the platform core the first time any code in the plugin is executed. It is intended to perform a simple initialization of the plugin environment. The platform may terminate initializers that do not complete in a timely fashion.

If this method throws an exception, it is taken as an indication that the plugin initialization has failed; as a result, the plugin will not be activated; moreover, the plugin will be marked as disabled and ineligible for activation for the duration.

Plugin startup code should be robust. In the event of a startup failure, the plugin's shutdown() method will be invoked automatically, in an attempt to close open files, etc.

Overrides:
startup in class org.eclipse.core.runtime.Plugin
Throws:
org.eclipse.core.runtime.CoreException - if this plugin did not start up properly

getLpexJar

public static java.util.jar.JarFile getLpexJar()
Get access to the LPEX jar file. This method is used to retrieve information from the jar manifest.