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.
- 
- 
Constructor SummaryConstructors Constructor Description AbstractCompareWithPerformer(org.eclipse.jgit.lib.Repository repository, String revisionToCompareWith, MatchingStrategy matchingStrategy, boolean mergeObjectsContent, boolean parseBslModuleStructure, Collection<org.eclipse.core.resources.IProject> projects, Map<org.eclipse.core.resources.IProject,List<Path>> pathsToFilter, String mergeSettingsFileName, IQualifiedNameFilePathConverter filePathConverter, IV8ProjectManager v8ProjectManager, IComparisonManager comparisonManager)Creates a new instance with the given parameters.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.jgit.revwalk.RevCommitgetBaseCommit()Returns the base commit.protected org.eclipse.jgit.revwalk.RevCommitgetCommitToCompareWith()Returns the commit to compare with.protected CompareMergeProcessBatchgetCompareMergeProcessBatch()Returns the compare/merge process batch.protected org.eclipse.jgit.revwalk.RevCommitgetHeadCommit()Returns the head commit.protected Collection<org.eclipse.core.resources.IProject>getProjects()Returns the projects on which the git comparison is performed.protected org.eclipse.jgit.lib.RepositorygetRepository()Returns the Git repository.protected StringgetRevisionToCompareWith()Returns the revision to compare with, may be commit hash, branch name or index revisionGitCompareUtils.INDEX.protected abstract voidonNothingToCompare()The callback method if there no changes to compare.voidperform(org.eclipse.core.runtime.IProgressMonitor monitor)Performs the 3-way comparison with the specified revision.protected abstract voidrunComparison(CompareMergeProcessBatch batch)Runs the comparison on the built compare/merge process batch.
 
- 
- 
- 
Constructor Detail- 
AbstractCompareWithPerformerpublic AbstractCompareWithPerformer(org.eclipse.jgit.lib.Repository repository, String revisionToCompareWith, MatchingStrategy matchingStrategy, boolean mergeObjectsContent, boolean parseBslModuleStructure, Collection<org.eclipse.core.resources.IProject> projects, Map<org.eclipse.core.resources.IProject,List<Path>> pathsToFilter, 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 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
- projects- the projects to run Git 'Compare With' command on, cannot be- null
- pathsToFilter- the map from a compared project to paths in the project limiting search for changes on the comparison, may be- null
- mergeSettingsFileName- the merge settings file name, may be- null
- filePathConverter- the qualified name file path converter, cannot be- null
- v8ProjectManager- the V8 project manager, cannot be- null
- comparisonManager- the comparison process manager, cannot be- null
- See Also:
- IComparisonProcessSettings
 
 
- 
 - 
Method Detail- 
performpublic void perform(org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException, InvalidPreferencesFormatExceptionPerforms the 3-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
- InvalidPreferencesFormatException- if the input settings did not conform to the appropriate XML document type for a collection of preferences
 
 - 
onNothingToCompareprotected abstract void onNothingToCompare() The callback method if there no changes to compare.
 - 
runComparisonprotected abstract void runComparison(CompareMergeProcessBatch batch) Runs the comparison on the built compare/merge process batch.- Parameters:
- batch- the compare/merge process batch, cannot be- null
 
 - 
getRepositoryprotected org.eclipse.jgit.lib.Repository getRepository() Returns the Git repository.- Returns:
- the Git repository, never null
 
 - 
getRevisionToCompareWithprotected String getRevisionToCompareWith() Returns the revision to compare with, may be commit hash, branch name or index revisionGitCompareUtils.INDEX.- Returns:
- the revision to compare with, never null
 
 - 
getProjectsprotected Collection<org.eclipse.core.resources.IProject> getProjects() Returns the projects on which the git comparison is performed.- Returns:
- the projects, never null
 
 - 
getCompareMergeProcessBatchprotected CompareMergeProcessBatch getCompareMergeProcessBatch() Returns the compare/merge process batch.- Returns:
- the compare/merge process batch, may be nullif the comparison hasn't started
 
 - 
getBaseCommitprotected org.eclipse.jgit.revwalk.RevCommit getBaseCommit() Returns the base commit.- Returns:
- the base commit, may be nullonly if the comparison hasn't started or an error has occurred or there is no base commit for the compared commits
 
 - 
getHeadCommitprotected org.eclipse.jgit.revwalk.RevCommit getHeadCommit() Returns the head commit.- Returns:
- the head commit, may be nullonly if the comparison hasn't started or an error has occurred
 
 - 
getCommitToCompareWithprotected org.eclipse.jgit.revwalk.RevCommit getCommitToCompareWith() Returns the commit to compare with.- Returns:
- the commit to compare with, may be nullonly if the comparison hasn't started or an error has occurred or it is the comparison with git index
 
 
- 
 
-