Package com._1c.g5.v8.dt.compare.git
Class AbstractCompareCommitsPerformer
java.lang.Object
com._1c.g5.v8.dt.compare.git.AbstractCompareCommitsPerformer
- Direct Known Subclasses:
CompareCommitsPerformer
An abstract class that provides ability to compare two commits using the EDT comparison mechanism.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IQualifiedNameFilePathConverterthe qualified name file path converterprotected final org.eclipse.jgit.revwalk.RevCommitthe main side commitprotected final MatchingStrategythe matching strategyprotected final org.eclipse.jgit.revwalk.RevCommitthe other side commitprotected final booleantells whether to compare a Bsl module with parsing module structureprotected final Paththe path limiting search for changes on comparisonprotected final org.eclipse.jgit.lib.Repositorythe Git repository -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCompareCommitsPerformer(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
Modifier and TypeMethodDescriptionprotected abstract voidThe callback method if there no changes to compare.voidperform(org.eclipse.core.runtime.IProgressMonitor monitor) Performs the 2-way comparison of the specified commits.protected abstract voidrunComparison(List<CompareMergeProcessDescriptor> descriptors) Runs the comparison on the builded descriptors.
-
Field Details
-
repository
protected final org.eclipse.jgit.lib.Repository repositorythe Git repository -
mainCommit
protected final org.eclipse.jgit.revwalk.RevCommit mainCommitthe main side commit -
otherCommit
protected final org.eclipse.jgit.revwalk.RevCommit otherCommitthe other side commit -
matchingStrategy
the matching strategy -
parseBslModuleStructure
protected final boolean parseBslModuleStructuretells whether to compare a Bsl module with parsing module structure -
pathToFilter
the path limiting search for changes on comparison -
filePathConverter
the qualified name file path converter
-
-
Constructor Details
-
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 benullmainCommit- the main side commit to compare, cannot benullotherCommit- the other side commit to compare, cannot benullmatchingStrategy- the matching strategy, cannot benullparseBslModuleStructure- 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 ornullto search all changesfilePathConverter- the qualified name file path converter, cannot benull
-
-
Method Details
-
perform
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
Runs the comparison on the builded descriptors.- Parameters:
descriptors- the compare/merge process descriptors, cannot benull
-