Package com._1c.g5.v8.dt.compare.git
Class AbstractCompareCommitsPerformer
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.git.AbstractCompareCommitsPerformer
-
public abstract class AbstractCompareCommitsPerformer extends Object
An abstract class that provides ability to compare two commits using the EDT comparison mechanism.
-
-
Field Summary
Fields Modifier and Type Field Description protected IQualifiedNameFilePathConverter
filePathConverter
the qualified name file path converterprotected org.eclipse.jgit.revwalk.RevCommit
mainCommit
the main side commitprotected MatchingStrategy
matchingStrategy
the matching strategyprotected org.eclipse.jgit.revwalk.RevCommit
otherCommit
the other side commitprotected boolean
parseBslModuleStructure
tells whether to compare a Bsl module with parsing module structureprotected Path
pathToFilter
the path limiting search for changes on comparisonprotected org.eclipse.jgit.lib.Repository
repository
the Git repository
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCompareCommitsPerformer(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.revwalk.RevCommit mainCommit, org.eclipse.jgit.revwalk.RevCommit otherCommit, MatchingStrategy matchingStrategy, boolean parseBslModuleStructure, Path pathToFilter, IQualifiedNameFilePathConverter filePathConverter)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
onNothingToCompare()
The callback method if there no changes to compare.void
perform(org.eclipse.core.runtime.IProgressMonitor monitor)
Performs the 2-way comparison of the specified commits.protected abstract void
runComparison(List<CompareMergeProcessDescriptor> descriptors)
Runs the comparison on the builded descriptors.
-
-
-
Field Detail
-
repository
protected final org.eclipse.jgit.lib.Repository repository
the Git repository
-
mainCommit
protected final org.eclipse.jgit.revwalk.RevCommit mainCommit
the main side commit
-
otherCommit
protected final org.eclipse.jgit.revwalk.RevCommit otherCommit
the other side commit
-
matchingStrategy
protected final MatchingStrategy matchingStrategy
the matching strategy
-
parseBslModuleStructure
protected final boolean parseBslModuleStructure
tells whether to compare a Bsl module with parsing module structure
-
pathToFilter
protected final Path pathToFilter
the path limiting search for changes on comparison
-
filePathConverter
protected final IQualifiedNameFilePathConverter filePathConverter
the qualified name file path converter
-
-
Constructor Detail
-
AbstractCompareCommitsPerformer
protected AbstractCompareCommitsPerformer(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.revwalk.RevCommit mainCommit, org.eclipse.jgit.revwalk.RevCommit otherCommit, MatchingStrategy matchingStrategy, boolean parseBslModuleStructure, Path pathToFilter, IQualifiedNameFilePathConverter filePathConverter)
Creates a new instance with the given parameters.- Parameters:
repository
- the Git repository to run comparison on, cannot benull
mainCommit
- the main side commit to compare, cannot benull
otherCommit
- the other side commit to compare, cannot benull
matchingStrategy
- the matching strategy, cannot benull
parseBslModuleStructure
- tells whether to compare and merge a Bsl module with parsing module structurepathToFilter
- the absolute path in the Git repositorу limiting search for changes on comparison ornull
to search all changesfilePathConverter
- the qualified name file path converter, cannot benull
-
-
Method Detail
-
perform
public void perform(org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
Performs the 2-way comparison of the specified commits.- Parameters:
monitor
- the progress monitor to indicate progress, may benull
- Throws:
IOException
- if failed to read the Git repository
-
onNothingToCompare
protected abstract void onNothingToCompare()
The callback method if there no changes to compare.
-
runComparison
protected abstract void runComparison(List<CompareMergeProcessDescriptor> descriptors)
Runs the comparison on the builded descriptors.- Parameters:
descriptors
- the compare/merge process descriptors, cannot benull
-
-