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 /ajbrowser | |
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 'ajbrowser')
-rw-r--r-- | ajbrowser/src/org/aspectj/tools/ajbrowser/CompilerMessagesPanel.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ajbrowser/src/org/aspectj/tools/ajbrowser/CompilerMessagesPanel.java b/ajbrowser/src/org/aspectj/tools/ajbrowser/CompilerMessagesPanel.java index 5324e50bc..46a162c1e 100644 --- a/ajbrowser/src/org/aspectj/tools/ajbrowser/CompilerMessagesPanel.java +++ b/ajbrowser/src/org/aspectj/tools/ajbrowser/CompilerMessagesPanel.java @@ -45,6 +45,7 @@ public class CompilerMessagesPanel extends JPanel implements TaskListManager { private JList list = new JList(); private DefaultListModel listModel = new DefaultListModel(); private BorderLayout borderLayout1 = new BorderLayout(); + private boolean hasWarning = false; public CompilerMessagesPanel() { try { @@ -94,15 +95,25 @@ public class CompilerMessagesPanel extends JPanel implements TaskListManager { public void addSourcelineTask(IMessage message) { listModel.addElement(new CompilerMessage(message)); + if (!hasWarning && IMessage.WARNING.isSameOrLessThan(message.getKind())) { + hasWarning = true; + } BrowserManager.getDefault().showMessages(); } public void addProjectTask(String message, IMessage.Kind kind) { IMessage m = new Message(message, kind, null, null); listModel.addElement(new CompilerMessage(m)); + if (!hasWarning && IMessage.WARNING.isSameOrLessThan(kind)) { + hasWarning = true; + } BrowserManager.getDefault().showMessages(); } + public boolean hasWarning() { + return hasWarning; + } + public void clearTasks() { listModel.clear(); } |