Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / AnnotationType.java
index c6ed4c2..a9e0ebc 100644 (file)
@@ -10,16 +10,44 @@ Contributors:
 **********************************************************************/
 package net.sourceforge.phpeclipse.phpeditor;
 
+import org.eclipse.jface.text.Assert;
+
 public final class AnnotationType {
        
-       public final static AnnotationType ALL= new AnnotationType();
-       public final static AnnotationType UNKNOWN= new AnnotationType();
-       public final static AnnotationType BOOKMARK= new AnnotationType();
-       public final static AnnotationType TASK= new AnnotationType();
-       public final static AnnotationType ERROR= new AnnotationType();
-       public final static AnnotationType WARNING= new AnnotationType();
-       public final static AnnotationType SEARCH_RESULT= new AnnotationType();
+       public static final AnnotationType ALL= new AnnotationType();
+       public static final AnnotationType UNKNOWN= new AnnotationType();
+       public static final AnnotationType BOOKMARK= new AnnotationType();
+       public static final AnnotationType TASK= new AnnotationType();
+       public static final AnnotationType ERROR= new AnnotationType();
+       public static final AnnotationType WARNING= new AnnotationType();
+       public static final AnnotationType SEARCH= new AnnotationType();
        
        private AnnotationType() {
        }
-}
+
+       public String toString() {
+               if (this == ALL)
+                       return "AnnotationType.ALL"; //$NON-NLS-1$
+               
+               if (this == UNKNOWN)
+                       return "AnnotationType.UNKNOWN"; //$NON-NLS-1$
+
+               if (this == BOOKMARK)
+                       return "AnnotationType.BOOKMARK"; //$NON-NLS-1$
+
+               if (this == TASK)
+                       return "AnnotationType.TASK"; //$NON-NLS-1$
+               
+               if (this == ERROR)
+                       return "AnnotationType.ERROR"; //$NON-NLS-1$
+
+               if (this == WARNING)
+                       return "AnnotationType.WARNING"; //$NON-NLS-1$
+
+               if (this == SEARCH)
+                       return "AnnotationType.SEARCH"; //$NON-NLS-1$
+
+               Assert.isLegal(false);
+               return ""; //$NON-NLS-1$
+       }
+}
\ No newline at end of file