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 IChangeNotifier
changeNotifier
This is used to implementIChangeNotifier
.protected Disposable
disposable
This is used to implementIDisposable
.protected ComposedAdapterFactory
parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory.protected Collection<Object>
supportedTypes
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
Constructors Constructor Description TreeCompareInputAdapterFactory()
Creates anComposeableAdapterFactory
with the following supported types:ICompareInput
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
adapt(Object object, Object type)
Adapter
adapt(Notifier notifier, Object type)
This implementation substitutes the factory itself as the key for the adapter.Adapter
adaptNew(Notifier object, Object type)
This records adapters for subsequent disposable.void
addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.Adapter
createTreeNodeAdapter()
void
dispose()
This disposes all the disposables.void
fireNotifyChanged(Notification notification)
This delegates tochangeNotifier
and toparentAdapterFactory
.ComposeableAdapterFactory
getRootAdapterFactory()
This returns the root adapter factory that contains this factory.boolean
isFactoryForType(Object type)
void
removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.void
setParentAdapterFactory(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 anComposeableAdapterFactory
with 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:
isFactoryForType
in interfaceAdapterFactory
- Overrides:
isFactoryForType
in 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:
adapt
in interfaceAdapterFactory
- Overrides:
adapt
in classAdapterFactoryImpl
- Parameters:
notifier
- the notifier to adapttype
- unused- Returns:
- a previously existing associated adapter, a new associated adapter if possible, or
null
otherwise.
-
adapt
public Object adapt(Object object, Object type)
- Specified by:
adapt
in interfaceAdapterFactory
- Overrides:
adapt
in 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:
getRootAdapterFactory
in 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:
setParentAdapterFactory
in interfaceComposeableAdapterFactory
- Parameters:
parentAdapterFactory
- the direct parent adapter factory into which this factory is composed
-
createTreeNodeAdapter
public Adapter createTreeNodeAdapter()
- Overrides:
createTreeNodeAdapter
in classTreeAdapterFactory
- See Also:
TreeAdapterFactory.createTreeNodeAdapter()
-
adaptNew
public Adapter adaptNew(Notifier object, Object type)
This records adapters for subsequent disposable.- Specified by:
adaptNew
in interfaceAdapterFactory
- Overrides:
adaptNew
in classAdapterFactoryImpl
-
addListener
public void addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.- Specified by:
addListener
in interfaceIChangeNotifier
-
removeListener
public void removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.- Specified by:
removeListener
in interfaceIChangeNotifier
-
fireNotifyChanged
public void fireNotifyChanged(Notification notification)
This delegates tochangeNotifier
and toparentAdapterFactory
.- Specified by:
fireNotifyChanged
in interfaceIChangeNotifier
-
dispose
public void dispose()
This disposes all the disposables.- Specified by:
dispose
in interfaceIDisposable
-
-