Class MergerExtensionRegistryListener
- java.lang.Object
-
- org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener
-
- org.eclipse.emf.compare.rcp.internal.merger.MergerExtensionRegistryListener
-
- All Implemented Interfaces:
EventListener,org.eclipse.core.runtime.IRegistryEventListener
public class MergerExtensionRegistryListener extends AbstractRegistryEventListener
Listener for contributions to the merger extension.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener
AbstractRegistryEventListener.Action
-
-
Constructor Summary
Constructors Constructor Description MergerExtensionRegistryListener(String pluginID, String extensionPointID, org.eclipse.core.runtime.ILog log, IMerger.Registry mergerRegistry)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaddedValid(org.eclipse.core.runtime.IConfigurationElement element)Process the given element as the addition of a valid element extension.protected booleanreadElement(org.eclipse.core.runtime.IConfigurationElement element, AbstractRegistryEventListener.Action b)Reads the givenelement.protected booleanremovedValid(org.eclipse.core.runtime.IConfigurationElement element)Process the given element as the removal of a valid element extension.protected booleanvalidateExtensionElement(org.eclipse.core.runtime.IConfigurationElement element)Validates if the given element is an element for the given extension and is well constructed.-
Methods inherited from class org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener
added, added, log, log, log, logMissingAttribute, readRegistry, removed, removed
-
-
-
-
Constructor Detail
-
MergerExtensionRegistryListener
public MergerExtensionRegistryListener(String pluginID, String extensionPointID, org.eclipse.core.runtime.ILog log, IMerger.Registry mergerRegistry)
Constructor.- Parameters:
pluginID- The plugin id.extensionPointID- The extension point id.log- The log in which to report failures.mergerRegistry- The actual registry that will be populated by this listener.
-
-
Method Detail
-
readElement
protected boolean readElement(org.eclipse.core.runtime.IConfigurationElement element, AbstractRegistryEventListener.Action b)Reads the givenelement. This method can be call when the element is added or remove. Theactionreflect it. It returns true if the element is recognized as valid regarding the monitored extension point. It will be call on sub elements recursively for all recognized ones.- Overrides:
readElementin classAbstractRegistryEventListener- Parameters:
element- the element to be read.b- is the element added or removed.- Returns:
- true if the element is recognized as valid regarding the monitored extension point.
- See Also:
org.eclipse.emf.compare.ide.utils.AbstractRegistryEventListener#readElement(org.eclipse.core.runtime.IConfigurationElement, org.eclipse.emf.compare.ide.utils.AbstractRegistryEventListener.Action)
-
validateExtensionElement
protected boolean validateExtensionElement(org.eclipse.core.runtime.IConfigurationElement element)
Validates if the given element is an element for the given extension and is well constructed. Returns true if the element should be further parsed for addition or removal.- Specified by:
validateExtensionElementin classAbstractRegistryEventListener- Parameters:
element- the element to validate.- Returns:
- true if the element should be further parsed for addition or removal, else otherwise.
- See Also:
AbstractRegistryEventListener.validateExtensionElement(org.eclipse.core.runtime.IConfigurationElement)
-
addedValid
protected boolean addedValid(org.eclipse.core.runtime.IConfigurationElement element)
Process the given element as the addition of a valid element extension.- Specified by:
addedValidin classAbstractRegistryEventListener- Parameters:
element- the element to be added.- Returns:
- true if the given element has been added and if its children should be processed, false otherwise.
- See Also:
AbstractRegistryEventListener.addedValid(org.eclipse.core.runtime.IConfigurationElement)
-
removedValid
protected boolean removedValid(org.eclipse.core.runtime.IConfigurationElement element)
Process the given element as the removal of a valid element extension.- Specified by:
removedValidin classAbstractRegistryEventListener- Parameters:
element- the element to be removed.- Returns:
- true if the given element has been removed and if its children should be processed, false otherwise.
- See Also:
AbstractRegistryEventListener.removedValid(org.eclipse.core.runtime.IConfigurationElement)
-
-