blob: b45a13c9dcff1e3f2ad6564d44589efdee32bd9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
/*******************************************************************************
* Copyright (C) 2008, Tor Arne Vestbø <torarnv@gmail.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.egit.ui.internal.decorators;
import org.eclipse.core.resources.IResource;
/**
* Represents the state of a resource that can be used as a basis for decoration
*/
public interface IDecoratableResource {
/**
* Set of possible staging states for a resource
*/
public enum Staged {
/** Represents a resource that is not staged */
NOT_STAGED,
/** Represents a resource that has been modified */
MODIFIED,
/** Represents a resource that is added to Git */
ADDED,
/** Represents a resource that is removed from Git */
REMOVED,
/** Represents a resource that has been renamed */
RENAMED
}
/**
* Gets the type of the resource as defined by {@link IResource}
*
* @return the type of the resource
*/
int getType();
/**
* Gets the name of the resource
*
* @return the name of the resource
*/
String getName();
/**
* Gets the current branch of the resource if applicable
*
* @return the name of the current branch, or <code>null</code> if not
* applicable
*/
String getBranch();
/**
* Returns whether or not the resource is tracked by Git
*
* @return whether or not the resource is tracked by Git
*/
boolean isTracked();
/**
* Returns whether or not the resource is ignored, either by a global team
* ignore in Eclipse, or by .git/info/exclude et al.
*
* @return whether or not the resource is ignored
*/
boolean isIgnored();
/**
* Returns whether or not the resource has changes that are not staged
*
* @return whether or not the resource is dirty
*/
boolean isDirty();
/**
* Returns the staged state of the resource
*
* The set of allowed values are defined by the <code>Staged</code> enum
*
* @return the staged state of the resource
*/
Staged staged();
/**
* Returns whether or not the resource has merge conflicts
*
* @return whether or not the resource has merge conflicts
*/
boolean hasConflicts();
/**
* Returns whether or not the resource is assumed valid
*
* @return whether or not the resource is assumed valid
*/
boolean isAssumeValid();
}
|