Class AbstractCompareWithPerformer


  • public abstract class AbstractCompareWithPerformer
    extends Object
    An abstract class that provides ability to run Git 'Compare With' command using the EDT comparison mechanism.
    • Field Detail

      • repository

        protected final org.eclipse.jgit.lib.Repository repository
        the Git repository
      • revisionToCompareWith

        protected final String revisionToCompareWith
        the revision to compare with
      • matchingStrategy

        protected final MatchingStrategy matchingStrategy
        the matching strategy
      • mergeObjectsContent

        protected final boolean mergeObjectsContent
        tells whether only objects content is to be merged
      • parseBslModuleStructure

        protected final boolean parseBslModuleStructure
        tells whether to compare a Bsl module with parsing module structure
      • project

        protected final org.eclipse.core.resources.IProject project
        the project to run 'Compare With' command on
      • pathToFilter

        protected final Path pathToFilter
        the path limiting search for changes on comparison
      • v8ProjectManager

        protected final IV8ProjectManager v8ProjectManager
        the V8 project manager
    • Constructor Detail

      • AbstractCompareWithPerformer

        public AbstractCompareWithPerformer​(org.eclipse.jgit.lib.Repository repository,
                                            String revisionToCompareWith,
                                            MatchingStrategy matchingStrategy,
                                            boolean mergeObjectsContent,
                                            boolean parseBslModuleStructure,
                                            org.eclipse.core.resources.IProject project,
                                            Path pathToFilter,
                                            IQualifiedNameFilePathConverter filePathConverter,
                                            IV8ProjectManager v8ProjectManager)
        Creates a new instance with the given parameters.
        Parameters:
        repository - the Git repository to run comparison on, cannot be null
        revisionToCompareWith - the revision to compare with, may be commit hash, branch name or index revision GitCompareUtils.INDEX, cannot be null
        matchingStrategy - the matching strategy, cannot be null
        mergeObjectsContent - tells whether only objects content is to be merged
        parseBslModuleStructure - tells whether to compare and merge a Bsl module with parsing module structure
        project - the project to run Git 'Compare With' command on, cannot be null
        pathToFilter - the absolute path in the project limiting search for changes on comparison or null to search all changes
        filePathConverter - the qualified name file path converter, cannot be null
        v8ProjectManager - the V8 project manager, cannot be null
        See Also:
        IComparisonProcessSettings
    • Method Detail

      • perform

        public void perform​(org.eclipse.core.runtime.IProgressMonitor monitor)
                     throws IOException,
                            InterruptedException
        Performs the 2-way comparison with the specified revision.
        Parameters:
        monitor - the progress monitor to indicate progress, may be null
        Throws:
        IOException - if failed to read the Git repository
        InterruptedException - if the operation was interrupted
      • onNothingToCompare

        protected abstract void onNothingToCompare()
        The callback method if there no changes to compare.
      • runComparison

        protected abstract void runComparison​(CompareMergeProcessDescriptor descriptor)
        Runs the comparison on the builded descriptor.
        Parameters:
        descriptor - the compare/merge process descriptor, cannot be null