Class TreeCompareInputAdapterFactory
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
org.eclipse.emf.edit.tree.util.TreeAdapterFactory
org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.provider.TreeCompareInputAdapterFactory
- All Implemented Interfaces:
AdapterFactory,ComposeableAdapterFactory,IChangeNotifier,IDisposable
public class TreeCompareInputAdapterFactory
extends TreeAdapterFactory
implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IChangeNotifierThis is used to implementIChangeNotifier.protected DisposableThis is used to implementIDisposable.protected ComposedAdapterFactoryThis keeps track of the root adapter factory that delegates to this adapter factory.protected final Collection<Object>This keeps track of all the supported types checked byisFactoryForType.Fields inherited from class org.eclipse.emf.edit.tree.util.TreeAdapterFactory
modelPackage, modelSwitch -
Constructor Summary
ConstructorsConstructorDescriptionCreates anComposeableAdapterFactorywith the following supported types:ICompareInput. -
Method Summary
Modifier and TypeMethodDescriptionThis implementation substitutes the factory itself as the key for the adapter.This records adapters for subsequent disposable.voidaddListener(INotifyChangedListener notifyChangedListener) This adds a listener.voiddispose()This disposes all the disposables.voidfireNotifyChanged(Notification notification) This delegates tochangeNotifierand toparentAdapterFactory.This returns the root adapter factory that contains this factory.booleanisFactoryForType(Object type) voidremoveListener(INotifyChangedListener notifyChangedListener) This removes a listener.voidsetParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) This sets the direct parent adapter factory into which this factory is composed.Methods inherited from class org.eclipse.emf.edit.tree.util.TreeAdapterFactory
createAdapter, createEObjectAdapterMethods inherited from class org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
adaptAllNew, associate, createAdapter, resolveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.emf.common.notify.AdapterFactory
adaptAllNew
-
Field Details
-
parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory. -
changeNotifier
This is used to implementIChangeNotifier. -
disposable
This is used to implementIDisposable. -
supportedTypes
This keeps track of all the supported types checked byisFactoryForType.
-
-
Constructor Details
-
TreeCompareInputAdapterFactory
public TreeCompareInputAdapterFactory()Creates anComposeableAdapterFactorywith the following supported types:ICompareInput.
- Parameters:
grouper- This will be used by the comparison adapter to group differences together.
-
-
Method Details
-
isFactoryForType
- Specified by:
isFactoryForTypein interfaceAdapterFactory- Overrides:
isFactoryForTypein classTreeAdapterFactory- See Also:
-
adapt
This implementation substitutes the factory itself as the key for the adapter.- Specified by:
adaptin interfaceAdapterFactory- Overrides:
adaptin classAdapterFactoryImpl- Parameters:
notifier- the notifier to adapttype- unused- Returns:
- a previously existing associated adapter, a new associated adapter if possible, or
nullotherwise.
-
adapt
- Specified by:
adaptin interfaceAdapterFactory- Overrides:
adaptin classAdapterFactoryImpl- See Also:
-
getRootAdapterFactory
This returns the root adapter factory that contains this factory.- Specified by:
getRootAdapterFactoryin interfaceComposeableAdapterFactory- Returns:
- the root adapter factory that contains this factory.
-
setParentAdapterFactory
This sets the direct parent adapter factory into which this factory is composed.- Specified by:
setParentAdapterFactoryin interfaceComposeableAdapterFactory- Parameters:
parentAdapterFactory- the direct parent adapter factory into which this factory is composed
-
createTreeNodeAdapter
- Overrides:
createTreeNodeAdapterin classTreeAdapterFactory- See Also:
-
adaptNew
This records adapters for subsequent disposable.- Specified by:
adaptNewin interfaceAdapterFactory- Overrides:
adaptNewin classAdapterFactoryImpl
-
addListener
This adds a listener.- Specified by:
addListenerin interfaceIChangeNotifier
-
removeListener
This removes a listener.- Specified by:
removeListenerin interfaceIChangeNotifier
-
fireNotifyChanged
This delegates tochangeNotifierand toparentAdapterFactory.- Specified by:
fireNotifyChangedin interfaceIChangeNotifier
-
dispose
public void dispose()This disposes all the disposables.- Specified by:
disposein interfaceIDisposable
-