Package com._1c.g5.v8.dt.compare.git
Class AbstractCompareWithPerformer
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.git.AbstractCompareWithPerformer
-
- Direct Known Subclasses:
CompareWithTestPerformer
public abstract class AbstractCompareWithPerformer extends Object
An abstract class that provides ability to run Git 'Compare With' command using the EDT comparison mechanism.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jgit.revwalk.RevCommit
baseCommit
Base commit.protected org.eclipse.jgit.revwalk.RevCommit
commitToCompareWith
Commit to compare with.protected IComparisonManager
comparisonManager
the comparison managerprotected IQualifiedNameFilePathConverter
filePathConverter
the qualified name file path converterprotected org.eclipse.jgit.revwalk.RevCommit
headCommit
Head commit.protected MatchingStrategy
matchingStrategy
the matching strategyprotected boolean
mergeObjectsContent
tells whether only objects content is to be mergedprotected 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.core.resources.IProject
project
the project to run 'Compare With' command onprotected org.eclipse.jgit.lib.Repository
repository
the Git repositoryprotected String
revisionToCompareWith
the revision to compare withprotected IV8ProjectManager
v8ProjectManager
the V8 project manager
-
Constructor Summary
Constructors Constructor Description AbstractCompareWithPerformer(org.eclipse.jgit.lib.Repository repository, String revisionToCompareWith, MatchingStrategy matchingStrategy, boolean mergeObjectsContent, boolean parseBslModuleStructure, org.eclipse.core.resources.IProject project, Path pathToFilter, String mergeSettingsFileName, IQualifiedNameFilePathConverter filePathConverter, IV8ProjectManager v8ProjectManager, IComparisonManager comparisonManager)
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 3-way comparison with the specified revision.protected abstract void
runComparison(CompareMergeProcessDescriptor descriptor)
Runs the comparison on the builded descriptor.
-
-
-
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
-
baseCommit
protected org.eclipse.jgit.revwalk.RevCommit baseCommit
Base commit.
-
commitToCompareWith
protected org.eclipse.jgit.revwalk.RevCommit commitToCompareWith
Commit to compare with.
-
headCommit
protected org.eclipse.jgit.revwalk.RevCommit headCommit
Head commit.
-
filePathConverter
protected final IQualifiedNameFilePathConverter filePathConverter
the qualified name file path converter
-
v8ProjectManager
protected final IV8ProjectManager v8ProjectManager
the V8 project manager
-
comparisonManager
protected final IComparisonManager comparisonManager
the comparison 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, String mergeSettingsFileName, IQualifiedNameFilePathConverter filePathConverter, IV8ProjectManager v8ProjectManager, IComparisonManager comparisonManager)
Creates a new instance with the given parameters.- Parameters:
repository
- the Git repository to run comparison on, cannot benull
revisionToCompareWith
- the revision to compare with, may be commit hash, branch name or index revisionGitCompareUtils.INDEX
, cannot benull
matchingStrategy
- the matching strategy, cannot benull
mergeObjectsContent
- tells whether only objects content is to be mergedparseBslModuleStructure
- tells whether to compare and merge a Bsl module with parsing module structureproject
- the project to run Git 'Compare With' command on, cannot benull
pathToFilter
- the absolute path in the project limiting search for changes on comparison ornull
to search all changesmergeSettingsFileName
- the merge settings file name, may benull
filePathConverter
- the qualified name file path converter, cannot benull
v8ProjectManager
- the V8 project manager, cannot benull
comparisonManager
- the comparison process manager, cannot benull
- See Also:
IComparisonProcessSettings
-
-
Method Detail
-
perform
public void perform(org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException, InvalidPreferencesFormatException
Performs the 3-way comparison with the specified revision.- Parameters:
monitor
- the progress monitor to indicate progress, may benull
- Throws:
IOException
- if failed to read the Git repositoryInvalidPreferencesFormatException
- if the input settings did not conform to the appropriate XML document type for a collection of preferences
-
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 benull
-
-