Commons

org.topcased.facilities.extensions
Class AbstractExtensionManager

java.lang.Object
  extended by org.topcased.facilities.extensions.AbstractExtensionManager
All Implemented Interfaces:
java.util.EventListener, org.eclipse.core.runtime.IRegistryChangeListener

public abstract class AbstractExtensionManager
extends java.lang.Object
implements org.eclipse.core.runtime.IRegistryChangeListener

An abstract implementation of en extension manager.
This manager can initialize itself iterating on all the registered extensions of a given extension point id.
It also listens to the platform extension registry changes and makes the appropriate modifications.
Clients must implements the addExtension() and the removeExtension() methods in order to define the subclassing manager behavior.
Creation : 24 nov. 2005


Constructor Summary
protected AbstractExtensionManager(java.lang.String extensionPointId)
          Constructor.
 
Method Summary
protected abstract  void addExtension(org.eclipse.core.runtime.IExtension extension)
          Adds the given extension to this manager.
 void dispose()
          Disposes this manager.
protected  void readRegistry()
          Reads the extension registry and add all the registered extensions for the managed extension point.
 void registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent event)
           
protected abstract  void removeExtension(org.eclipse.core.runtime.IExtension extension)
          Removes the given extension from this manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExtensionManager

protected AbstractExtensionManager(java.lang.String extensionPointId)
Constructor.

Parameters:
extensionPointId - the unique id of the managed extension point (e.g., "org.eclipse.core.resources.builders")
Method Detail

dispose

public void dispose()
Disposes this manager.


addExtension

protected abstract void addExtension(org.eclipse.core.runtime.IExtension extension)
Adds the given extension to this manager.

Parameters:
extension - a registered extension

removeExtension

protected abstract void removeExtension(org.eclipse.core.runtime.IExtension extension)
Removes the given extension from this manager.

Parameters:
extension - a unregistered extension

registryChanged

public void registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent event)
Specified by:
registryChanged in interface org.eclipse.core.runtime.IRegistryChangeListener
See Also:
IRegistryChangeListener.registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)

readRegistry

protected void readRegistry()
Reads the extension registry and add all the registered extensions for the managed extension point.


Commons

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.