Class GitComparisonDataSourceDescriptor
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.datasource.GitComparisonDataSourceDescriptor
-
- All Implemented Interfaces:
IComparisonDataSourceDescriptor
public class GitComparisonDataSourceDescriptor extends Object implements IComparisonDataSourceDescriptor
The descriptor represented by a Git commit.
-
-
Constructor Summary
Constructors Constructor Description GitComparisonDataSourceDescriptor(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevCommit revCommit, boolean useIndex, Path projectPath, boolean closeRepositoryOnWorkFinish)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
closeRepositoryOnWorkFinish()
Tells whether the Git repository should be closed after work with it was finished.boolean
equals(Object obj)
String
getProjectName()
Returns the project name for this data source descriptor.Path
getProjectPath()
Returns the project path in Git repository.org.eclipse.jgit.lib.Repository
getRepository()
Returns the Git repository, can not benull
org.eclipse.jgit.revwalk.RevCommit
getRevCommit()
Returns the Git commit reference.int
hashCode()
boolean
useIndex()
Checks whether need to use the index data as the source of the comparison.
-
-
-
Constructor Detail
-
GitComparisonDataSourceDescriptor
public GitComparisonDataSourceDescriptor(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevCommit revCommit, boolean useIndex, Path projectPath, boolean closeRepositoryOnWorkFinish)
Creates a new instance with the given parameters.- Parameters:
repo
- the Git repository, can not benull
revCommit
- the Git commit reference, will not be used ifuseIndex
istrue
, may benull
useIndex
-true
if it needed to use the index data as the source of the comparisonprojectPath
- the project path in Git repository, can not benull
closeRepositoryOnWorkFinish
- tells whether the Git repository should be closed after work with it was finished
-
-
Method Detail
-
getProjectName
public String getProjectName()
Description copied from interface:IComparisonDataSourceDescriptor
Returns the project name for this data source descriptor.- Specified by:
getProjectName
in interfaceIComparisonDataSourceDescriptor
- Returns:
- the project name, never
null
-
getRepository
public org.eclipse.jgit.lib.Repository getRepository()
Returns the Git repository, can not benull
- Returns:
- the Git repository, never
null
-
getRevCommit
public org.eclipse.jgit.revwalk.RevCommit getRevCommit()
Returns the Git commit reference.- Returns:
- the Git commit reference, may be
null
-
useIndex
public boolean useIndex()
Checks whether need to use the index data as the source of the comparison.- Returns:
true
if it needed to use the index data as the source of the comparison
-
getProjectPath
public Path getProjectPath()
Returns the project path in Git repository.- Returns:
- the project path in Git repository, never
null
-
closeRepositoryOnWorkFinish
public boolean closeRepositoryOnWorkFinish()
Tells whether the Git repository should be closed after work with it was finished.- Returns:
true
if the Git repository should be closed after work with it was finished,false
otherwise
-
-