Class CompareInputAdapter
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterImpl
-
- org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.CompareInputAdapter
-
- All Implemented Interfaces:
org.eclipse.compare.structuremergeviewer.ICompareInput
,org.eclipse.core.runtime.IAdaptable
,Adapter
,Adapter.Internal
,IDisposable
- Direct Known Subclasses:
TreeNodeCompareInput
public abstract class CompareInputAdapter extends AdapterImpl implements org.eclipse.compare.structuremergeviewer.ICompareInput, IDisposable, org.eclipse.core.runtime.IAdaptable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
-
-
Field Summary
-
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
-
-
Constructor Summary
Constructors Constructor Description CompareInputAdapter(AdapterFactory adapterFactory)
Simple constructor storing the givenAdapterFactory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
void
copy(boolean leftToRight)
void
dispose()
This will remove this adapter from all its the targets and dispose any remaining children wrappers in the children store.protected void
fireChange()
Sends out notification that a change has occurred on theICompareInput
.protected IAccessorFactory
getAccessorFactoryForTarget()
Returns the appropriateIAccessorFactory
from the accessor factory registry.Object
getAdapter(Class adapter)
protected AdapterFactory
getAdapterFactory()
Final accessor to theAdapterFactory
for sub classses.org.eclipse.compare.ITypedElement
getAncestor()
EObject
getComparisonObject()
org.eclipse.swt.graphics.Image
getImage()
int
getKind()
org.eclipse.compare.ITypedElement
getLeft()
IModelUpdateStrategy
getModelUpdateStrategy()
Returns theIModelUpdateStrategy
to be used by content mergers for this compare input.String
getName()
org.eclipse.compare.ITypedElement
getRight()
protected AdapterFactory
getRootAdapterFactory()
Gets the root factory if this local adapter factory is composed, otherwise just the local one.boolean
isAdapterForType(Object type)
protected boolean
isThreeWay(Notifier notifier)
void
removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
.void
setDeferredAdapter(org.eclipse.ui.progress.IDeferredWorkbenchAdapter deferredWorkbenchAdapter)
Set aIDeferredWorkbenchAdapter
for this.-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, notifyChanged, setTarget, unsetTarget
-
-
-
-
Constructor Detail
-
CompareInputAdapter
public CompareInputAdapter(AdapterFactory adapterFactory)
Simple constructor storing the givenAdapterFactory
.- Parameters:
adapterFactory
- the factory.
-
-
Method Detail
-
isAdapterForType
public boolean isAdapterForType(Object type)
- Specified by:
isAdapterForType
in interfaceAdapter
- Overrides:
isAdapterForType
in classAdapterImpl
- See Also:
AdapterImpl.isAdapterForType(java.lang.Object)
-
getAdapterFactory
protected final AdapterFactory getAdapterFactory()
Final accessor to theAdapterFactory
for sub classses.- Returns:
- the wrapped
AdapterFactory
.
-
getRootAdapterFactory
protected final AdapterFactory getRootAdapterFactory()
Gets the root factory if this local adapter factory is composed, otherwise just the local one.
-
addCompareInputChangeListener
public void addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
- Specified by:
addCompareInputChangeListener
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
-
removeCompareInputChangeListener
public void removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
.- Specified by:
removeCompareInputChangeListener
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
-
fireChange
protected void fireChange()
Sends out notification that a change has occurred on theICompareInput
.
-
getComparisonObject
public EObject getComparisonObject()
-
copy
public void copy(boolean leftToRight)
- Specified by:
copy
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.copy(boolean)
-
getAccessorFactoryForTarget
protected IAccessorFactory getAccessorFactoryForTarget()
Returns the appropriateIAccessorFactory
from the accessor factory registry.- Returns:
- the appropriate
IAccessorFactory
.
-
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImage
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ITypedElement.getImage()
-
getKind
public int getKind()
- Specified by:
getKind
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.getKind()
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.getName()
-
getAncestor
public org.eclipse.compare.ITypedElement getAncestor()
- Specified by:
getAncestor
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.getAncestor()
-
isThreeWay
protected boolean isThreeWay(Notifier notifier)
-
getLeft
public org.eclipse.compare.ITypedElement getLeft()
- Specified by:
getLeft
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.getLeft()
-
getRight
public org.eclipse.compare.ITypedElement getRight()
- Specified by:
getRight
in interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput
- See Also:
ICompareInput.getRight()
-
dispose
public void dispose()
This will remove this adapter from all its the targets and dispose any remaining children wrappers in the children store.- Specified by:
dispose
in interfaceIDisposable
-
setDeferredAdapter
public void setDeferredAdapter(org.eclipse.ui.progress.IDeferredWorkbenchAdapter deferredWorkbenchAdapter)
Set aIDeferredWorkbenchAdapter
for this.- Parameters:
deferredWorkbenchAdapter
-
-
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- See Also:
IAdaptable.getAdapter(Class)
-
getModelUpdateStrategy
public IModelUpdateStrategy getModelUpdateStrategy()
Returns theIModelUpdateStrategy
to be used by content mergers for this compare input.- Returns:
- The
IModelUpdateStrategy
to be used.
-
-