public interface RTEGitCompareCommand extends RTAbstractCommand
Compare works on selection where selection is either array of IResource
from current workspace or single File
from
Git repository. The logical or closure compare can be used only with UML resources from workspace and local reference must be set to
Local
in this case.
The command provides support only for visual compare.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HEAD
Content identifier for the 'HEAD' version.
|
static java.lang.String |
INDEX
Content identifier for the content staged in the index.
|
static java.lang.String |
LOCAL
Content identifier for the local version.
|
Modifier and Type | Method and Description |
---|---|
RTEGitCompareCommand |
setCompareType(CompareType type)
Set compare type.
|
RTEGitCompareCommand |
setFilter(java.lang.String filter)
Set filter for selection.
|
RTEGitCompareCommand |
setLocalRef(java.lang.String ref)
Set local branch/ref/commit for the compare operation.
|
RTEGitCompareCommand |
setRemoteRef(java.lang.String ref)
Set branch/ref/commit for the compare operation.
|
RTEGitCompareCommand |
setRepository(java.io.File repository)
Set path to existing Git repository
|
RTEGitCompareCommand |
setSelection(java.io.File file)
Initialize current selection using
File . |
RTEGitCompareCommand |
setSelection(org.eclipse.core.resources.IResource[] resources)
Initialize current selection using array of
IResource . |
call
static final java.lang.String LOCAL
setLocalRef()
.static final java.lang.String INDEX
setRemoteRef()/setLocalRef()
.static final java.lang.String HEAD
setRemoteRef()/setLocalRef()
.RTEGitCompareCommand setRepository(java.io.File repository)
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 sameRTEGitCompareCommand setRemoteRef(java.lang.String ref)
ref
- - branch name, reference, commit id or Index
RTEGitCompareCommand setLocalRef(java.lang.String ref)
The default value is Local.
ref
- - branch name, reference or commit idRTEGitCompareCommand setCompareType(CompareType type)
CompareType
for details.
Default value is Auto
type
- - CompareType
RTEGitCompareCommand setSelection(org.eclipse.core.resources.IResource[] resources)
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.resources
- RTEGitCompareCommand setSelection(java.io.File file)
File
.file
- - file in Git repository with absolute or repository-relative pathRTEGitCompareCommand setFilter(java.lang.String filter)
filter
- - comma-separated list of workspace or repository-relative paths. Path can contain ? and * symbols.