public abstract class AbstractComparisonScope extends AdapterImpl implements IComparisonScope2, IDiagnosable
IComparisonScope
can be sub-classed in order to avoid re-implementing some
of the methods imposed by this interface.Adapter.Internal
Modifier and Type | Field and Description |
---|---|
protected Set<URI> |
allInvolvedResourceURIs
The resources URIs representing the files that have been selected to be in the scope of the comparison.
|
protected Diagnostic |
diagnostic
The diagnostic of the notifiers.
|
protected Notifier |
left
The left root of this comparison.
|
protected Set<String> |
nsURIs
The namespace uris detected in the comparison.
|
protected Notifier |
origin
|
protected Set<String> |
resourceURIs
The resource uris detected in the comparison.
|
protected Notifier |
right
The right root of this comparison.
|
target
Constructor and Description |
---|
AbstractComparisonScope(Notifier left,
Notifier right,
Notifier origin)
This will instantiate a scope with left, right and origin Notifiers defined.
|
Modifier and Type | Method and Description |
---|---|
Set<URI> |
getAllInvolvedResourceURIs()
Returns the URIs of the all files involved in this scope.
|
Diagnostic |
getDiagnostic()
Return the diagnostic associated with this scope.
|
Notifier |
getLeft()
This will be used by EMF Compare in order to retrieve the left "root" Notifier of this comparison; i.e
the first object to be considered by the match engine, and from which the iteration over children
should start.
|
Set<String> |
getNsURIs()
This will be used by EMF Compare in order to retrieve the namespace uris detected in the scope.
|
Notifier |
getOrigin()
If EMF Compare should consider a Notifier as being the common ancestor of the "left" and "right"
objects to compare, it should be returned from here.
|
Set<String> |
getResourceURIs()
This will be used by EMF Compare in order to retrieve the resource uris detected in the scope.
|
Notifier |
getRight()
This will be used by EMF Compare in order to retrieve the right "root" Notifier of this comparison; i.e
the first object to be considered by the match engine, and from which the iteration over children
should start.
|
boolean |
isAdapterForType(Object type) |
void |
setDiagnostic(Diagnostic diagnostic)
Set the diagnostic to be associated with this scope.
|
getTarget, notifyChanged, setTarget, unsetTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getCoveredEObjects, getCoveredResources
protected Notifier left
protected Notifier right
protected Notifier origin
protected Diagnostic diagnostic
public AbstractComparisonScope(Notifier left, Notifier right, Notifier origin)
left
- The left root of this comparison.right
- The right root of this comparison.origin
- The common ancestor of left
and right
. May be null
.public Notifier getLeft()
getLeft
in interface IComparisonScope
null
.IComparisonScope.getLeft()
public Notifier getRight()
getRight
in interface IComparisonScope
null
.IComparisonScope.getRight()
public Notifier getOrigin()
getOrigin
in interface IComparisonScope
null
.IComparisonScope.getOrigin()
public Set<String> getNsURIs()
getNsURIs
in interface IComparisonScope
IComparisonScope.getNsURIs()
public Set<String> getResourceURIs()
getResourceURIs
in interface IComparisonScope
IComparisonScope.getResourceURIs()
public Diagnostic getDiagnostic()
getDiagnostic
in interface IDiagnosable
org.eclipse.emf.compare.scope.IComparisonScope.Internal#getDiagnostic()
public void setDiagnostic(Diagnostic diagnostic)
setDiagnostic
in interface IDiagnosable
diagnostic
- the diagnosticorg.eclipse.emf.compare.scope.IComparisonScope.Internal#setDiagnostic(org.eclipse.emf.common.util.Diagnostic)
public Set<URI> getAllInvolvedResourceURIs()
The returned URIs represent all files that have been selected to be in scope of the comparison. This may include files that are not existing anymore or that may have actually not been modified.
getAllInvolvedResourceURIs
in interface IComparisonScope2
IComparisonScope2.getAllInvolvedResourceURIs()
public boolean isAdapterForType(Object type)
isAdapterForType
in interface Adapter
isAdapterForType
in class AdapterImpl
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.