]> source.dussan.org Git - jgit.git/commitdiff
Add @Override annotations to enums 14/5514/1
authorTomasz Zarna <Tomasz.Zarna@pl.ibm.com>
Mon, 2 Apr 2012 09:24:05 +0000 (11:24 +0200)
committerTomasz Zarna <Tomasz.Zarna@pl.ibm.com>
Mon, 2 Apr 2012 09:24:05 +0000 (11:24 +0200)
Change-Id: I8fa3b89a6349c1231251b346cae12c1c4f095929

org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java

index d4b6dcb65a854f7e8e20dfa00da5156a8dec06db..5b3c5d4e780025bf07f5889c073266057ecec234 100644 (file)
@@ -68,12 +68,14 @@ public class CherryPickResult {
                },
                /** */
                FAILED {
+                       @Override
                        public String toString() {
                                return "Failed";
                        }
                },
                /** */
                CONFLICTING {
+                       @Override
                        public String toString() {
                                return "Conflicting";
                        }
index 6ce2fc6685c4c0d058eb82b986c1f58faee3c612..fcc3bb65e6f2ab03c327e27e82baab8cac2997fc 100644 (file)
@@ -78,6 +78,7 @@ public class MergeResult {
                },
                /** */
                ALREADY_UP_TO_DATE {
+                       @Override
                        public String toString() {
                                return "Already-up-to-date";
                        }
@@ -89,6 +90,7 @@ public class MergeResult {
                },
                /** */
                FAILED {
+                       @Override
                        public String toString() {
                                return "Failed";
                        }
@@ -100,6 +102,7 @@ public class MergeResult {
                },
                /** */
                MERGED {
+                       @Override
                        public String toString() {
                                return "Merged";
                        }
@@ -111,6 +114,7 @@ public class MergeResult {
                },
                /** */
                CONFLICTING {
+                       @Override
                        public String toString() {
                                return "Conflicting";
                        }
@@ -122,6 +126,7 @@ public class MergeResult {
                },
                /** */
                NOT_SUPPORTED {
+                       @Override
                        public String toString() {
                                return "Not-yet-supported";
                        }
index 00ccb28fca9b077b1ff08d4af42a628c15784088..7e3ba51da8f7f0b7145f9fd26ae1b2a1af368656 100644 (file)
@@ -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; }
        };