aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
diff options
context:
space:
mode:
authorTomasz Zarna <Tomasz.Zarna@pl.ibm.com>2012-04-02 11:24:05 +0200
committerTomasz Zarna <Tomasz.Zarna@pl.ibm.com>2012-04-02 11:24:05 +0200
commit4e1de3080987580195ea5fe884361a5bbae2c352 (patch)
treef4e9a24cc098e2f3c317e4a6764d06f37fd488e1 /org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
parent6189a68d1d48e38779380cea81efa530405ff762 (diff)
downloadjgit-4e1de3080987580195ea5fe884361a5bbae2c352.tar.gz
jgit-4e1de3080987580195ea5fe884361a5bbae2c352.zip
Add @Override annotations to enums
Change-Id: I8fa3b89a6349c1231251b346cae12c1c4f095929
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java104
1 files changed, 104 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
index 00ccb28fca..7e3ba51da8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
@@ -57,10 +57,19 @@ import org.eclipse.jgit.internal.JGitText;
public enum RepositoryState {
/** Has no work tree and cannot be used for normal editing. */
BARE {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return false; }
+
+ @Override
public boolean canAmend() { return false; }
+
+ @Override
public String getDescription() { return "Bare"; }
},
@@ -68,20 +77,38 @@ public enum RepositoryState {
* A safe state for working normally
* */
SAFE {
+ @Override
public boolean canCheckout() { return true; }
+
+ @Override
public boolean canResetHead() { return true; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_normal; }
},
/** An unfinished merge. Must resolve or reset before continuing normally
*/
MERGING {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return true; }
+
+ @Override
public boolean canCommit() { return false; }
+
+ @Override
public boolean canAmend() { return false; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_conflicts; }
},
@@ -90,20 +117,38 @@ public enum RepositoryState {
* contain any unmerged paths.
*/
MERGING_RESOLVED {
+ @Override
public boolean canCheckout() { return true; }
+
+ @Override
public boolean canResetHead() { return true; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return false; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_merged; }
},
/** An unfinished cherry-pick. Must resolve or reset before continuing normally
*/
CHERRY_PICKING {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return true; }
+
+ @Override
public boolean canCommit() { return false; }
+
+ @Override
public boolean canAmend() { return false; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_conflicts; }
},
@@ -112,10 +157,19 @@ public enum RepositoryState {
* contain any unmerged paths.
*/
CHERRY_PICKING_RESOLVED {
+ @Override
public boolean canCheckout() { return true; }
+
+ @Override
public boolean canResetHead() { return true; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return false; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_merged; }
},
@@ -123,10 +177,19 @@ public enum RepositoryState {
* An unfinished rebase or am. Must resolve, skip or abort before normal work can take place
*/
REBASING {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_rebaseOrApplyMailbox; }
},
@@ -134,10 +197,19 @@ public enum RepositoryState {
* An unfinished rebase. Must resolve, skip or abort before normal work can take place
*/
REBASING_REBASING {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_rebase; }
},
@@ -145,10 +217,19 @@ public enum RepositoryState {
* An unfinished apply. Must resolve, skip or abort before normal work can take place
*/
APPLY {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_applyMailbox; }
},
@@ -156,10 +237,19 @@ public enum RepositoryState {
* An unfinished rebase with merge. Must resolve, skip or abort before normal work can take place
*/
REBASING_MERGE {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_rebaseWithMerge; }
},
@@ -167,10 +257,19 @@ public enum RepositoryState {
* An unfinished interactive rebase. Must resolve, skip or abort before normal work can take place
*/
REBASING_INTERACTIVE {
+ @Override
public boolean canCheckout() { return false; }
+
+ @Override
public boolean canResetHead() { return false; }
+
+ @Override
public boolean canCommit() { return true; }
+
+ @Override
public boolean canAmend() { return true; }
+
+ @Override
public String getDescription() { return JGitText.get().repositoryState_rebaseInteractive; }
},
@@ -179,16 +278,21 @@ public enum RepositoryState {
*/
BISECTING {
/* Changing head is a normal operation when bisecting */
+ @Override
public boolean canCheckout() { return true; }
/* Do not reset, checkout instead */
+ @Override
public boolean canResetHead() { return false; }
/* Commit during bisect is useful */
+ @Override
public boolean canCommit() { return true; }
+ @Override
public boolean canAmend() { return false; }
+ @Override
public String getDescription() { return JGitText.get().repositoryState_bisecting; }
};