SWT LPEX
v3.0.5

com.ibm.lpex.alef
Class LpexPlugin

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.ui.plugin.AbstractUIPlugin
          extended bycom.ibm.lpex.alef.LpexPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class LpexPlugin
extends AbstractUIPlugin

LPEX Editor plug-in runtime class.


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
LpexPlugin(IPluginDescriptor descriptor)
          Creates a new instance.
 
Method Summary
static LpexPlugin getDefault()
          Returns an instance of this plug-in.
static JarFile getLpexJar()
          Get access to the LPEX jar file.
static ResourceBundle getResourceBundle()
          Returns the resource bundle for this plug-in.
static String getResourceLpexString(String key)
          Returns the string with the specified key from the LpexPlugin resource bundle.
static String getResourceLpexString(String key, String arg)
          Returns the string with the specified key and substitution argument from the LpexPlugin resource bundle.
static String getResourceString(String key)
          Retrieve a string from the LpexPlugin resource bundle.
 void start(org.osgi.framework.BundleContext context)
          Starts up the LPEX plug-in.
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup, stop
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LpexPlugin

public LpexPlugin(IPluginDescriptor descriptor)
Creates a new instance. Constructs an LPEX plug-in runtime object for the given plug-in descriptor. Note that this plug-in still depends on org.eclipse.core.runtime.compatibility.

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

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

getDefault

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

Returns:
the initialized instance of LpexPlugin

getResourceBundle

public static ResourceBundle getResourceBundle()
Returns the resource bundle for this plug-in. The resource file of the LPEX plug-in is com.ibm.lpex.alef.PluginResources.properties.


getResourceString

public static String getResourceString(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 String getResourceLpexString(String key)
Returns the string with the specified key from the LpexPlugin resource bundle. 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 String getResourceLpexString(String key,
                                           String arg)
Returns the string with the specified key and substitution argument from the LpexPlugin resource bundle. 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)

start

public void start(org.osgi.framework.BundleContext context)
           throws Exception
Starts up the LPEX plug-in. This method is automatically invoked by the platform core the first time any code in the plug-in is executed. It is intended to perform a simple initialization of the plug-in 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 plug-in initialization has failed; as a result, the plug-in will not be activated; moreover, the plug-in will be marked as disabled and ineligible for activation for the duration.

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

Parameters:
context - the bundle context that represents the plug-in to the OSGi framework; for security reasons, it is strongly recommended that this object should not be divulged
Throws:
Exception - if this plug-in did not start up properly

getLpexJar

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


SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.