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
Fields Modifier and Type Field Description protected IChangeNotifierchangeNotifierThis is used to implementIChangeNotifier.protected DisposabledisposableThis is used to implementIDisposable.protected ComposedAdapterFactoryparentAdapterFactoryThis keeps track of the root adapter factory that delegates to this adapter factory.protected Collection<Object>supportedTypesThis keeps track of all the supported types checked byisFactoryForType.-
Fields inherited from class org.eclipse.emf.edit.tree.util.TreeAdapterFactory
modelPackage, modelSwitch
-
-
Constructor Summary
Constructors Constructor Description TreeCompareInputAdapterFactory()Creates anComposeableAdapterFactorywith the following supported types:ICompareInput.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectadapt(Object object, Object type)Adapteradapt(Notifier notifier, Object type)This implementation substitutes the factory itself as the key for the adapter.AdapteradaptNew(Notifier object, Object type)This records adapters for subsequent disposable.voidaddListener(INotifyChangedListener notifyChangedListener)This adds a listener.AdaptercreateTreeNodeAdapter()voiddispose()This disposes all the disposables.voidfireNotifyChanged(Notification notification)This delegates tochangeNotifierand toparentAdapterFactory.ComposeableAdapterFactorygetRootAdapterFactory()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, createEObjectAdapter
-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
adaptAllNew, associate, createAdapter, resolve
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.common.notify.AdapterFactory
adaptAllNew
-
-
-
-
Field Detail
-
parentAdapterFactory
protected ComposedAdapterFactory parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory.
-
changeNotifier
protected final IChangeNotifier changeNotifier
This is used to implementIChangeNotifier.
-
disposable
protected Disposable disposable
This is used to implementIDisposable.
-
supportedTypes
protected final Collection<Object> supportedTypes
This keeps track of all the supported types checked byisFactoryForType.
-
-
Constructor Detail
-
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 Detail
-
isFactoryForType
public boolean isFactoryForType(Object type)
- Specified by:
isFactoryForTypein interfaceAdapterFactory- Overrides:
isFactoryForTypein classTreeAdapterFactory- See Also:
AdapterFactory.isFactoryForType(java.lang.Object)
-
adapt
public Adapter adapt(Notifier notifier, Object type)
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
public Object adapt(Object object, Object type)
- Specified by:
adaptin interfaceAdapterFactory- Overrides:
adaptin classAdapterFactoryImpl- See Also:
AdapterFactoryImpl.adapt(java.lang.Object, java.lang.Object)
-
getRootAdapterFactory
public ComposeableAdapterFactory 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
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
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
public Adapter createTreeNodeAdapter()
- Overrides:
createTreeNodeAdapterin classTreeAdapterFactory- See Also:
TreeAdapterFactory.createTreeNodeAdapter()
-
adaptNew
public Adapter adaptNew(Notifier object, Object type)
This records adapters for subsequent disposable.- Specified by:
adaptNewin interfaceAdapterFactory- Overrides:
adaptNewin classAdapterFactoryImpl
-
addListener
public void addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.- Specified by:
addListenerin interfaceIChangeNotifier
-
removeListener
public void removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.- Specified by:
removeListenerin interfaceIChangeNotifier
-
fireNotifyChanged
public void fireNotifyChanged(Notification notification)
This delegates tochangeNotifierand toparentAdapterFactory.- Specified by:
fireNotifyChangedin interfaceIChangeNotifier
-
dispose
public void dispose()
This disposes all the disposables.- Specified by:
disposein interfaceIDisposable
-
-