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 voidaddCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)voidcopy(boolean leftToRight)voiddispose()This will remove this adapter from all its the targets and dispose any remaining children wrappers in the children store.protected voidfireChange()Sends out notification that a change has occurred on theICompareInput.protected IAccessorFactorygetAccessorFactoryForTarget()Returns the appropriateIAccessorFactoryfrom the accessor factory registry.ObjectgetAdapter(Class adapter)protected AdapterFactorygetAdapterFactory()Final accessor to theAdapterFactoryfor sub classses.org.eclipse.compare.ITypedElementgetAncestor()EObjectgetComparisonObject()org.eclipse.swt.graphics.ImagegetImage()intgetKind()org.eclipse.compare.ITypedElementgetLeft()IModelUpdateStrategygetModelUpdateStrategy()Returns theIModelUpdateStrategyto be used by content mergers for this compare input.StringgetName()org.eclipse.compare.ITypedElementgetRight()protected AdapterFactorygetRootAdapterFactory()Gets the root factory if this local adapter factory is composed, otherwise just the local one.booleanisAdapterForType(Object type)protected booleanisThreeWay(Notifier notifier)voidremoveCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener).voidsetDeferredAdapter(org.eclipse.ui.progress.IDeferredWorkbenchAdapter deferredWorkbenchAdapter)Set aIDeferredWorkbenchAdapterfor 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:
isAdapterForTypein interfaceAdapter- Overrides:
isAdapterForTypein classAdapterImpl- See Also:
AdapterImpl.isAdapterForType(java.lang.Object)
-
getAdapterFactory
protected final AdapterFactory getAdapterFactory()
Final accessor to theAdapterFactoryfor 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:
addCompareInputChangeListenerin 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:
removeCompareInputChangeListenerin 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:
copyin interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ICompareInput.copy(boolean)
-
getAccessorFactoryForTarget
protected IAccessorFactory getAccessorFactoryForTarget()
Returns the appropriateIAccessorFactoryfrom the accessor factory registry.- Returns:
- the appropriate
IAccessorFactory.
-
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImagein interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ITypedElement.getImage()
-
getKind
public int getKind()
- Specified by:
getKindin interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ICompareInput.getKind()
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ICompareInput.getName()
-
getAncestor
public org.eclipse.compare.ITypedElement getAncestor()
- Specified by:
getAncestorin interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ICompareInput.getAncestor()
-
isThreeWay
protected boolean isThreeWay(Notifier notifier)
-
getLeft
public org.eclipse.compare.ITypedElement getLeft()
- Specified by:
getLeftin interfaceorg.eclipse.compare.structuremergeviewer.ICompareInput- See Also:
ICompareInput.getLeft()
-
getRight
public org.eclipse.compare.ITypedElement getRight()
- Specified by:
getRightin 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:
disposein interfaceIDisposable
-
setDeferredAdapter
public void setDeferredAdapter(org.eclipse.ui.progress.IDeferredWorkbenchAdapter deferredWorkbenchAdapter)
Set aIDeferredWorkbenchAdapterfor this.- Parameters:
deferredWorkbenchAdapter-
-
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- See Also:
IAdaptable.getAdapter(Class)
-
getModelUpdateStrategy
public IModelUpdateStrategy getModelUpdateStrategy()
Returns theIModelUpdateStrategyto be used by content mergers for this compare input.- Returns:
- The
IModelUpdateStrategyto be used.
-
-