Class Subject


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

Sample subject plug-in for the listener extension pattern. The subject plug-in provides a listeners extension-point, and notifes the extension members of this extension-point when its state is updated via the update method.

Extension processing by this plug-in obtains references to its listeners from all of its extensions, and saves these references for future notification. When the state of the plugin is changed through the update method, these listeners are notified.

The plug-in class is used as a natural place to house the extension and notification processing. No specific activation/deactivation processing is required by this plug-in. So strictly speaking, a plug-in class is not necessary for this plug-in. Nevertheless, the plug-in instance provides a convenient place to do the basic work required of this plug-in.


Fields inherited from class org.eclipse.core.runtime.Plugin
Constructor Summary
Subject(org.eclipse.core.runtime.IPluginDescriptor descriptor)
Method Summary
 void update()
          Update the state of the subject.
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, 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


public Subject(org.eclipse.core.runtime.IPluginDescriptor descriptor)
Method Detail


public void update()
Update the state of the subject. Causes notifications to be broadcast to the subject's listeners.