]> source.dussan.org Git - aspectj.git/commitdiff
Fix for 44155: TODO tasks miscategorized as warnings (fixed by Andrew Huff)
authoraclement <aclement>
Thu, 5 May 2005 10:36:18 +0000 (10:36 +0000)
committeraclement <aclement>
Thu, 5 May 2005 10:36:18 +0000 (10:36 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java
testing/src/org/aspectj/testing/xml/SoftMessage.java

index 9a856fbd4fb24773d00474356c64402191de4438..e2c29624504721cb86f11c444cf8a302b69ded1d 100644 (file)
@@ -146,9 +146,18 @@ public class EclipseAdapterUtils {
                        extraDetails = extraDetails.substring(0,extraDetails.length()-"[deow=true]".length());
                }
                
+               // If the 'problem' represents a TO DO kind of thing then use the message kind that
+               // represents this so AJDT sees it correctly.
+               IMessage.Kind kind;
+               if (problem.getID()==IProblem.Task) {
+                 kind=IMessage.TASKTAG;
+               } else {
+                 if (problem.isError()) { kind = IMessage.ERROR; }
+                 else                   { kind = IMessage.WARNING; }
+               }
         IMessage msg = new Message(problem.getMessage(), 
                                                           extraDetails,
-                                                                  problem.isError() ? IMessage.ERROR : IMessage.WARNING,
+                                                                  kind,
                                                                   sourceLocation, 
                                                                   null,
                                                                   seeAlsoLocations,
index cec8baf71f869c0c905b0f0d7fca2856e7376751..d75f9d83898cd5af5a9eda3d9da615858a53661e 100644 (file)
@@ -212,6 +212,10 @@ public class SoftMessage implements IMessage {
        public boolean isInfo() {
                return kind == IMessage.INFO;
        }
+       
+       public boolean isTaskTag() {
+               return kind == IMessage.TASKTAG;
+       }
 
        /** @return true if  kind == IMessage.ABORT  */
        public boolean isAbort() {