Package org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer

# 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 given `AdapterFactory`.

## Method Summary

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 the `ICompareInput`.
`protected IAccessorFactory`
`getAccessorFactoryForTarget()`
Returns the appropriate `IAccessorFactory` from the accessor factory registry.
`Object`
`getAdapter(Class adapter)`
`protected final AdapterFactory`
`getAdapterFactory()`
Final accessor to the `AdapterFactory` 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 the `IModelUpdateStrategy` to be used by content mergers for this compare input.
`String`
`getName()`
`org.eclipse.compare.ITypedElement`
`getRight()`
`protected final 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 a `IDeferredWorkbenchAdapter` for this.

### Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl

`getTarget, notifyChanged, setTarget, unsetTarget`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CompareInputAdapter

public CompareInputAdapter(AdapterFactory adapterFactory)
Simple constructor storing the given `AdapterFactory`.

Parameters:
  `adapterFactory` - the factory.

## Method Details

### isAdapterForType

public boolean isAdapterForType(Object type)

Specified by:
  `isAdapterForType` in interface `Adapter`
Overrides:
  `isAdapterForType` in class `AdapterImpl`
See Also:
  - `AdapterImpl.isAdapterForType(java.lang.Object)`

### getAdapterFactory

protected final AdapterFactory getAdapterFactory()
Final accessor to the `AdapterFactory` 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 interface `org.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 interface `org.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 the `ICompareInput`.

### getComparisonObject

public EObject getComparisonObject()

### copy

public void copy(boolean leftToRight)

Specified by:
  `copy` in interface `org.eclipse.compare.structuremergeviewer.ICompareInput`
See Also:
  - `ICompareInput.copy(boolean)`

### getAccessorFactoryForTarget

protected IAccessorFactory getAccessorFactoryForTarget()
Returns the appropriate `IAccessorFactory` from the accessor factory registry.

Returns:
  the appropriate `IAccessorFactory`.

### getImage

public org.eclipse.swt.graphics.Image getImage()

Specified by:
  `getImage` in interface `org.eclipse.compare.structuremergeviewer.ICompareInput`
See Also:
  - `ITypedElement.getImage()`

### getKind

public int getKind()

Specified by:
  `getKind` in interface `org.eclipse.compare.structuremergeviewer.ICompareInput`
See Also:
  - `ICompareInput.getKind()`

### getName

public String getName()

Specified by:
  `getName` in interface `org.eclipse.compare.structuremergeviewer.ICompareInput`
See Also:
  - `ICompareInput.getName()`

### getAncestor

public org.eclipse.compare.ITypedElement getAncestor()

Specified by:
  `getAncestor` in interface `org.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 interface `org.eclipse.compare.structuremergeviewer.ICompareInput`
See Also:
  - `ICompareInput.getLeft()`

### getRight

public org.eclipse.compare.ITypedElement getRight()

Specified by:
  `getRight` in interface `org.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 interface `IDisposable`

### setDeferredAdapter

public void setDeferredAdapter(org.eclipse.ui.progress.IDeferredWorkbenchAdapter deferredWorkbenchAdapter)
Set a `IDeferredWorkbenchAdapter` for this.

Parameters:
  `deferredWorkbenchAdapter` -

### getAdapter

public Object getAdapter(Class adapter)

Specified by:
  `getAdapter` in interface `org.eclipse.core.runtime.IAdaptable`
See Also:
  - `IAdaptable.getAdapter(Class)`

### getModelUpdateStrategy

public IModelUpdateStrategy getModelUpdateStrategy()
Returns the `IModelUpdateStrategy` to be used by content mergers for this compare input.

Returns:
  The `IModelUpdateStrategy` to be used.