TPTP 4.4.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.core
Class TestCorePlugin

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.hyades.test.core.TestCorePlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator, ISystemUtility

public class TestCorePlugin
extends org.eclipse.core.runtime.Plugin
implements ISystemUtility

Plugin class for the test core plug-in; also provides other utilities exposed through its implementation of the system utility interface. System utilities are provided through the standalone system utility class when in standalone mode.

Since:
3.2
See Also:
ISystemUtility

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
TestCorePlugin()
          Default constructor for the execution harness plugin, state is passed in via the lifecycle-related methods start/stop providing the bundle context.
 
Method Summary
static TestCorePlugin getDefault()
          Provides public static access to the singleton instance of this plug-in class.
static java.lang.String getPluginId()
          Provides public static access to the plugin id for this plug-in, this is defined in the plugin.xml file.
 java.util.ResourceBundle getResourceBundle()
          Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.
 java.lang.String getString(java.lang.String key)
          Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.
static java.lang.String getString(java.lang.String key, java.lang.String argument)
          Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.
static java.lang.String getString(java.lang.String key, java.lang.String[] arguments)
          Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.
 void logError(java.lang.String text)
          Logs an error described by a text.
 void logError(java.lang.Throwable exc)
           
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCorePlugin

public TestCorePlugin()
Default constructor for the execution harness plugin, state is passed in via the lifecycle-related methods start/stop providing the bundle context. This class is meant to be a singleton but is not enforced by this class, it is enforced by the caller that must only create us once.

Method Detail

getDefault

public static TestCorePlugin getDefault()
Provides public static access to the singleton instance of this plug-in class.

Returns:
the singleton instance stored in this class

getPluginId

public static java.lang.String getPluginId()
Provides public static access to the plugin id for this plug-in, this is defined in the plugin.xml file.

Returns:
the plugin id for this plug-in

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.

Resolves the plugin's resource bundle.

If the plugin's resource bundle can not be resolved, null is returned.

IMPORTANT: Do not use this method to retrieve values from the resource bundle. This method is provided so this plugin's resource bundle can be used as the parent of another plugin's resource bundle.

Specified by:
getResourceBundle in interface ISystemUtility
Returns:
The plugin's resource bundle, otherwise null.

getString

public java.lang.String getString(java.lang.String key)
Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.

Resolves the localized message associated with the parameter key based on the default locale from the plugin's resource bundle.

If the key does not exist in the plugin's resource bundle, the key is returned.

Noteworthy, the resultant message is not formatted (e.g. no message parameter substitution).

Specified by:
getString in interface ISystemUtility
Parameters:
key - The key of the message in the plugin's resource bundle.
Returns:
The localized message associated with the parameter key from the plugin's resource bundle, otherwise the key.

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.String argument)
Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.

Resolves the localized and formatted message associated with the parameter key based on the default locale from the plugin's resource bundle.

Message formatting is done by the NLS class using the default locale.

If the key does not exist in the plugin's resource bundle, the key is returned.

Parameters:
key - The key of the message in the plugin's resource bundle.
argument - The first message parameter for formatting in the localized and formatted message.
Returns:
The localized message associated with the parameter key from the plugin's resource bundle, otherwise the key.

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.String[] arguments)
Deprecated. As of TPTP V4.4, use TestCorePluginResourceBundle for resolving resources. The plugin.properties property file ONLY contains messages for the this plug-in's MANIFEST.MF and plugin.xml files.

Resolves the localized and formatted message associated with the parameter key based on the default locale from the plugin's resource bundle.

Message formatting is done by the NLS class using the default locale.

If the key does not exist in the plugin's resource bundle, the key is returned.

Parameters:
key - The key of the message in the plugin's resource bundle.
arguments - The array of message parameters for formatting in the localized and formatted message.
Returns:
The localized message associated with the parameter key from the plugin's resource bundle, otherwise the key.

logError

public void logError(java.lang.Throwable exc)
Specified by:
logError in interface ISystemUtility

logError

public void logError(java.lang.String text)
Logs an error described by a text.

This method should be used whenever a class in this plugin has to log an error since it adheres to the global logging strategy.

Parameters:
text -

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Throws:
java.lang.Exception

TPTP 4.4.0 Testing Tools Project
Public API Specification