public class RTEGitCompareCommandImpl extends Object implements RTEGitCompareCommand
HEAD, INDEX, LOCAL
Constructor and Description |
---|
RTEGitCompareCommandImpl() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.runtime.IStatus |
call() |
RTEGitCompareCommand |
setCompareType(CompareType type)
Set compare type.
|
RTEGitCompareCommand |
setFilter(String filter)
Set filter for selection.
|
RTEGitCompareCommand |
setLocalRef(String ref)
Set local branch/ref/commit for the compare operation.
|
RTEGitCompareCommand |
setRemoteRef(String ref)
Set branch/ref/commit for the compare operation.
|
RTEGitCompareCommand |
setRepository(File repository)
Set path to existing Git repository
|
RTEGitCompareCommand |
setSelection(File file)
Initialize current selection using
File . |
RTEGitCompareCommand |
setSelection(org.eclipse.core.resources.IResource[] resources)
Initialize current selection using array of
IResource . |
public org.eclipse.core.runtime.IStatus call()
call
in interface RTAbstractCommand
public RTEGitCompareCommand setRepository(File repository)
RTEGitCompareCommand
setRepository
in interface RTEGitCompareCommand
repository
- - path to Git repository. Path may or may not include '.git' folder. Paths '/dir1/dir2/dir3' and '/dir1/dir2/dir3/.git' are considered the samepublic RTEGitCompareCommand setRemoteRef(String ref)
RTEGitCompareCommand
setRemoteRef
in interface RTEGitCompareCommand
ref
- - branch name, reference, commit id or Index
public RTEGitCompareCommand setLocalRef(String ref)
RTEGitCompareCommand
The default value is Local.
setLocalRef
in interface RTEGitCompareCommand
ref
- - branch name, reference or commit idpublic RTEGitCompareCommand setCompareType(CompareType type)
RTEGitCompareCommand
CompareType
for details.
Default value is Auto
setCompareType
in interface RTEGitCompareCommand
type
- - CompareType
public RTEGitCompareCommand setSelection(org.eclipse.core.resources.IResource[] resources)
RTEGitCompareCommand
IResource
. Client may use IFile
or IProject
as selection.
When using projects the command will extract model files from selection. Client may also use setFilter(String)
to further refine
current selection.setSelection
in interface RTEGitCompareCommand
public RTEGitCompareCommand setSelection(File file)
RTEGitCompareCommand
File
.setSelection
in interface RTEGitCompareCommand
file
- - file in Git repository with absolute or repository-relative pathpublic RTEGitCompareCommand setFilter(String filter)
RTEGitCompareCommand
setFilter
in interface RTEGitCompareCommand
filter
- - comma-separated list of workspace or repository-relative paths. Path can contain ? and * symbols.