com.ibm.jdg2e.simplemodel
Class SimpleModel

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended bycom.ibm.jdg2e.simplemodel.SimpleModel
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The main plugin class to be used in the desktop.


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
SimpleModel()
          The constructor.
 
Method Summary
static SimpleModel getDefault()
           
 java.util.ResourceBundle getResourceBundle()
           
static java.lang.String getResourceString(java.lang.String key)
           
static IRoadTrip getRoadTrip()
          Creates and returns an instance of the RoadTrip.
 void save()
          Serializes the road trip model to the plug-in's state directory.
 void stop(org.osgi.framework.BundleContext context)
          Saves the road trip model when this plug-in is stopped.
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, start, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleModel

public SimpleModel()
The constructor.

Method Detail

getDefault

public static SimpleModel getDefault()
Returns:
the shared instance.

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns:
the plugin's resource bundle.

getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Parameters:
key - for the string to be located.
Returns:
the string from the plugin's resource bundle, or 'key' if not found.

getRoadTrip

public static IRoadTrip getRoadTrip()
Creates and returns an instance of the RoadTrip. Only way to get to the RoadTrip.

Returns:
RoadTrip - the instance of the RoadTrip available at runtime.

save

public void save()
Serializes the road trip model to the plug-in's state directory.


stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Saves the road trip model when this plug-in is stopped.

Throws:
java.lang.Exception
See Also:
BundleActivator.stop(org.osgi.framework.BundleContext)