diff options
author | wisberg <wisberg> | 2003-05-05 15:18:01 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-05-05 15:18:01 +0000 |
commit | 4c00febe0b767ff8b466456c5d89e45673451961 (patch) | |
tree | 26ada4f24136d0a2990536ed4032e9a90629d830 /ajde/testsrc | |
parent | f500cc5cb546b863616dca8b98603bf19b14f71c (diff) | |
download | aspectj-4c00febe0b767ff8b466456c5d89e45673451961.tar.gz aspectj-4c00febe0b767ff8b466456c5d89e45673451961.zip |
implement binary-incompatible API for detecting whether any warnings exist, to enable/disable message display.
Diffstat (limited to 'ajde/testsrc')
-rw-r--r-- | ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java index 2664088bf..3647a33fa 100644 --- a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java +++ b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java @@ -26,26 +26,41 @@ import org.aspectj.bridge.*; public class NullIdeTaskListManager implements TaskListManager { List sourceLineTasks = new ArrayList(); + boolean hasWarning = false; public void addSourcelineTask( String message, ISourceLocation sourceLocation, IMessage.Kind kind) { addSourcelineTask(new Message(message, kind, null, sourceLocation)); + if (!hasWarning && IMessage.WARNING.isSameOrLessThan(kind)) { + hasWarning = true; + } } public void addSourcelineTask(IMessage message) { sourceLineTasks.add(new SourceLineTask(message)); + if (!hasWarning && IMessage.WARNING.isSameOrLessThan(message.getKind())) { + hasWarning = true; + } // System.out.println("> added sourceline task: " + message + ", file: " + sourceLocation.getSourceFile().getAbsolutePath() // + ": " + sourceLocation.getLine()); } public void addProjectTask(String message, IMessage.Kind kind) { + if (!hasWarning && IMessage.WARNING.isSameOrLessThan(kind)) { + hasWarning = true; + } // System.out.println("> added project task: " + message + ", kind: " + kind); } + public boolean hasWarning() { + return hasWarning; + } + public void clearTasks() { sourceLineTasks = new ArrayList(); + hasWarning = false; // System.out.println("> cleared tasks"); } |