com.bolour.sample.eclipse.listener.subject
Class Subject
java.lang.Object
|
+--org.eclipse.core.runtime.Plugin
|
+--com.bolour.sample.eclipse.listener.subject.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.
- Author:
- Azad
Fields inherited from class org.eclipse.core.runtime.Plugin |
PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME |
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 |
Subject
public Subject(org.eclipse.core.runtime.IPluginDescriptor descriptor)
update
public void update()
- Update the state of the subject. Causes notifications
to be broadcast to the subject's listeners.