Class AbstractComparisonScope

    • Field Detail

      • left

        protected Notifier left
        The left root of this comparison.
      • right

        protected Notifier right
        The right root of this comparison.
      • origin

        protected Notifier origin
        The common ancestor of left and right. May be null.
      • nsURIs

        protected Set<String> nsURIs
        The namespace uris detected in the comparison.
      • resourceURIs

        protected Set<String> resourceURIs
        The resource uris detected in the comparison.
      • diagnostic

        protected Diagnostic diagnostic
        The diagnostic of the notifiers.
      • allInvolvedResourceURIs

        protected Set<URI> allInvolvedResourceURIs
        The resources URIs representing the files that have been selected to be in the scope of the comparison.
    • Constructor Detail

      • AbstractComparisonScope

        public AbstractComparisonScope​(Notifier left,
                                       Notifier right,
                                       Notifier origin)
        This will instantiate a scope with left, right and origin Notifiers defined.
        Parameters:
        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.
    • Method Detail

      • getLeft

        public 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.
        Specified by:
        getLeft in interface IComparisonScope
        Returns:
        The left root of this comparison. May not be null.
        See Also:
        IComparisonScope.getLeft()
      • getRight

        public 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.
        Specified by:
        getRight in interface IComparisonScope
        Returns:
        The right root of this comparison. May not be null.
        See Also:
        IComparisonScope.getRight()
      • getOrigin

        public 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.
        Specified by:
        getOrigin in interface IComparisonScope
        Returns:
        The origin root for this comparison. May be null.
        See Also:
        IComparisonScope.getOrigin()
      • getDiagnostic

        public Diagnostic getDiagnostic()
        Return the diagnostic associated with this scope. For instance, it may contain errors that occurred during loading of its notifiers.
        Specified by:
        getDiagnostic in interface IDiagnosable
        Returns:
        the diagnostic
        See Also:
        org.eclipse.emf.compare.scope.IComparisonScope.Internal#getDiagnostic()
      • setDiagnostic

        public void setDiagnostic​(Diagnostic diagnostic)
        Set the diagnostic to be associated with this scope.
        Specified by:
        setDiagnostic in interface IDiagnosable
        Parameters:
        diagnostic - the diagnostic
        See Also:
        org.eclipse.emf.compare.scope.IComparisonScope.Internal#setDiagnostic(org.eclipse.emf.common.util.Diagnostic)
      • getAllInvolvedResourceURIs

        public Set<URI> getAllInvolvedResourceURIs()
        Returns the URIs of the all files involved in this scope.

        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.

        Specified by:
        getAllInvolvedResourceURIs in interface IComparisonScope2
        Returns:
        The file URIs.
        See Also:
        IComparisonScope2.getAllInvolvedResourceURIs()