com.ibm.jdg2e.resources.programming
Class ResourceProgramming

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.ui.plugin.AbstractUIPlugin
          extended bycom.ibm.jdg2e.resources.programming.ResourceProgramming
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class ResourceProgramming
extends org.eclipse.ui.plugin.AbstractUIPlugin

The plugin class for the Resource Programming Plugin. Instantiated by the platform when the plug-in is started.

Note: The plug-in class name is EDUResourcePlugin to avoid a name collision and confusion with the platform Resources Plug-in (see getWorkspace() method).


Field Summary
static boolean TRACE_ENABLED
          Global Trace Control
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
ResourceProgramming()
          The constructor.
 
Method Summary
 void addMy_SaveP()
          Adds a workspace save participant when called by this plug-ins startup() method.
 void addResourceChangeListener()
          Adds a workspace resource change listener when called by the ActionManageTraceRCLs logic.
static ResourceProgramming getDefault()
           
 org.eclipse.swt.widgets.List getList()
           
 java.util.ResourceBundle getResourceBundle()
           
static java.lang.String getResourceString(java.lang.String key)
           
static org.eclipse.core.resources.IWorkspace getWorkspace()
          Returns the workspace instance using the platform implementation of the Resources plugin.
 boolean isRclActive()
           
 void removeResourceChangeListener()
          Removes an existing workspace resource change listener when called by the ActionManageTraceRCLs logic.
 void resetRCLCounter()
          Reset request to tell RCL to start counting events from one again.
 void setList(org.eclipse.swt.widgets.List list)
          Define list for use when writing events from the RCL.
 void start(org.osgi.framework.BundleContext context)
          Method triggered when the plug-in started by Eclipse.
 
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
 

Field Detail

TRACE_ENABLED

public static final boolean TRACE_ENABLED
Global Trace Control

See Also:
Constant Field Values
Constructor Detail

ResourceProgramming

public ResourceProgramming()
The constructor.

Method Detail

addMy_SaveP

public void addMy_SaveP()
                 throws org.eclipse.core.runtime.CoreException
Adds a workspace save participant when called by this plug-ins startup() method. Save participant logic can interpret the returned saved state. A null saved state can be returned the first time a save participant is added. If requested during a previous save event, a resource delta with changes since the last save is returned.

Throws:
org.eclipse.core.runtime.CoreException

addResourceChangeListener

public void addResourceChangeListener()
Adds a workspace resource change listener when called by the ActionManageTraceRCLs logic. Multiple approaches to adding an RCL, with all or selected event types identified, are included in the method source.


getDefault

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

getList

public org.eclipse.swt.widgets.List getList()
Returns:
the list used to display content in the RCL Events view.

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 -
Returns:
the string from the plugin's resource bundle, or 'key' if not found.

getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()
Returns the workspace instance using the platform implementation of the Resources plugin. (names happen to be the same).

Returns:
workspace instance

isRclActive

public boolean isRclActive()
Returns:
boolean indicating the resource change listener state.

removeResourceChangeListener

public void removeResourceChangeListener()
Removes an existing workspace resource change listener when called by the ActionManageTraceRCLs logic. Multiple approaches to adding an RCL, with all or selected event types identified, are included in the method source.


resetRCLCounter

public void resetRCLCounter()
Reset request to tell RCL to start counting events from one again.


setList

public void setList(org.eclipse.swt.widgets.List list)
Define list for use when writing events from the RCL.

Parameters:
list -

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Method triggered when the plug-in started by Eclipse. Adds the recent edits resource change listener (see RecentEditsRCL) and workspace save participant (see WorkspaceSaveParticipant).

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