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

## Class EmptyComparisonScope

- java.lang.Object
- - org.eclipse.emf.common.notify.impl.AdapterImpl
  - - org.eclipse.emf.compare.scope.AbstractComparisonScope
    - - org.eclipse.emf.compare.ide.ui.internal.logical.EmptyComparisonScope

All Implemented Interfaces:
  `Adapter`, `Adapter.Internal`, `IComparisonScope`, `IComparisonScope2`, `IDiagnosable`

    public class EmptyComparisonScope
    extends AbstractComparisonScope

This implementation of a comparison scope can be supplied to EMF Compare if there was an error beyond repair during the creation of the scope.

### 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.compare.scope.AbstractComparisonScope

`allInvolvedResourceURIs, diagnostic, left, nsURIs, origin, resourceURIs, right`

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

`target`

### Constructor Summary

Constructors
`EmptyComparisonScope()` Default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Iterator<? extends EObject>` `getChildren​(EObject eObject)` This will be used by EMF Compare in order to know which EObjects should be considered to be part of the comparison scope when it is launched on the given EObject.
`Iterator<? extends EObject>` `getCoveredEObjects​(Resource resource)` This will be used by EMF Compare in order to determine the EObjects that it should iterate over.
`Iterator<? extends Resource>` `getCoveredResources​(ResourceSet resourceSet)` This will be used by EMF Compare in order to determine the Resources that should be considered part of the comparison when it is launched on the given resource set.

### Methods inherited from class org.eclipse.emf.compare.scope.AbstractComparisonScope

`getAllInvolvedResourceURIs, getDiagnostic, getLeft, getNsURIs, getOrigin, getResourceURIs, getRight, isAdapterForType, setDiagnostic`

### 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 Detail

#### EmptyComparisonScope

    public EmptyComparisonScope()

Default constructor.

### Method Detail

#### getCoveredResources

    public Iterator<? extends Resource> getCoveredResources​(ResourceSet resourceSet)

This will be used by EMF Compare in order to determine the Resources that should be considered part of the comparison when it is launched on the given resource set.

Do note that this will only be called once per Resource. We will retrieve the set of EMF resources to include in the comparison, match them, then use `IComparisonScope.getCoveredEObjects(Resource)` in order to determine the actual EObjects to cover during that comparison.

Parameters:
  `resourceSet` - The resource set for which we need to know all resources spanned by the comparison.
Returns:
  An iterator over the `Resource`s which are part of this scope.

#### getCoveredEObjects

    public Iterator<? extends EObject> getCoveredEObjects​(Resource resource)

This will be used by EMF Compare in order to determine the EObjects that it should iterate over.

Do note that this will only be called once per comparison. EMF Compare expects this to return the whole set of EObjects that should be covered by the comparison when launched on the given Resource.

Parameters:
  `resource` - The resource for which we need to determine all EObjects spanned by the comparison.
Returns:
  An iterator over the `EObject`s which are part of this scope.

#### getChildren

    public Iterator<? extends EObject> getChildren​(EObject eObject)

This will be used by EMF Compare in order to know which EObjects should be considered to be part of the comparison scope when it is launched on the given EObject.

Do note that this will only be called once per comparison on EObjects, and never for comparisons launched on `ResourceSet`s or `Resource`s. EMF Compare expects the whole set of EObject that should be covered by the comparison to be returned by this.

Parameters:
  `eObject` - The EObject for which we need to determine the comparison scope.
Returns:
  An iterator over the `EObject`s which are part of this scope.