Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit
Class IBMiEditPlugin

java.lang.Object
  extended by SystemBasePlugin
      extended by com.ibm.etools.iseries.edit.IBMiEditPlugin

public class IBMiEditPlugin
extends SystemBasePlugin

The activator class controls the plug-in life cycle


Field Summary
static String copyright
           
static String HELPPREFIX
           
static String PLUGIN_ID
           
 
Constructor Summary
IBMiEditPlugin()
          The constructor
 
Method Summary
static IBMiEditPlugin getDefault()
          Returns the shared instance
static ImageDescriptor getImageDescriptorByFileName(String strImage)
          Returns the image descriptor given the file name.
static URL getPluginInstallURL()
          Return the file path where this plugin is installed.
static String getString(ResourceBundle resourceBundle, String key, String defaultString)
          Get a string from a given resource bundle, with an english string to use a default if the given key is not found.
static String getStringForTemplate(String key)
          Get a string from this plugin's resource bundle.
protected  void initializeImageRegistry()
           
protected static InputStream loadInputStream(String strFilename)
          iserieseditor Returns the resource bundle given its filename without file extension.
static Properties loadProperties(String strFilename)
          iserieseditor Returns the properties object given its filename without file extension.
 ResourceBundle loadResourceBundle(String fileName)
          Sets the resource bundle.
 boolean showView(String strViewId)
          iserieseditor Shows the view given a view identifier.
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright

PLUGIN_ID

public static final String PLUGIN_ID
See Also:
Constant Field Values

HELPPREFIX

public static final String HELPPREFIX
See Also:
Constant Field Values
Constructor Detail

IBMiEditPlugin

public IBMiEditPlugin()
The constructor

Method Detail

start

public void start(BundleContext context)
           throws Exception
Throws:
Exception

stop

public void stop(BundleContext context)
          throws Exception
Throws:
Exception

getDefault

public static IBMiEditPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

getPluginInstallURL

public static URL getPluginInstallURL()
Return the file path where this plugin is installed.

Returns:
URL where plugin is installed

initializeImageRegistry

protected void initializeImageRegistry()

getImageDescriptorByFileName

public static ImageDescriptor getImageDescriptorByFileName(String strImage)
Returns the image descriptor given the file name.


showView

public boolean showView(String strViewId)
iserieseditor Shows the view given a view identifier.


loadResourceBundle

public final ResourceBundle loadResourceBundle(String fileName)
Sets the resource bundle. Called by child class in their constructor, say, to load in their resource bundle. Handles rare case when not found by telling user, then dying. Note: This is NOT to be used for plugin.properties since Eclipse handles that file differently.

Parameters:
name - of .properties file, without the '.properties' specified
Returns:
ResourceBundle if loaded successfully, null if not.

getStringForTemplate

public static String getStringForTemplate(String key)
Get a string from this plugin's resource bundle. If not found, stack trace info is placed in the plugin's log file to help pinpoint the offending code.


getString

public static String getString(ResourceBundle resourceBundle,
                               String key,
                               String defaultString)
Get a string from a given resource bundle, with an english string to use a default if the given key is not found.

If not found, stack trace info is placed in the plugin's log file to help pinpoint the offending code.


loadProperties

public static Properties loadProperties(String strFilename)
iserieseditor Returns the properties object given its filename without file extension.


loadInputStream

protected static InputStream loadInputStream(String strFilename)
iserieseditor Returns the resource bundle given its filename without file extension.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.