Package com._1c.g5.v8.dt.compare.git
Class AbstractCompareWithPerformer
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.git.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 Summary
Fields Modifier and Type Field Description protected IQualifiedNameFilePathConverter
filePathConverter
the qualified name file path converterprotected 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, IQualifiedNameFilePathConverter filePathConverter, IV8ProjectManager v8ProjectManager)
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 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
-
filePathConverter
protected final IQualifiedNameFilePathConverter filePathConverter
the qualified name file path converter
-
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 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 changesfilePathConverter
- the qualified name file path converter, cannot benull
v8ProjectManager
- the V8 project manager, cannot benull
- 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 benull
- Throws:
IOException
- if failed to read the Git repositoryInterruptedException
- 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 benull
-
-