diff options
author | wisberg <wisberg> | 2003-04-30 02:36:45 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-04-30 02:36:45 +0000 |
commit | 30d1db184fd47c74014b1b87fc95e2d950d00c54 (patch) | |
tree | 473632b206825e8638d17dc6ae34e9752a2329bc /ajde | |
parent | 3bc503e4539c492dd8f1d06f03a729d3171320ba (diff) | |
download | aspectj-30d1db184fd47c74014b1b87fc95e2d950d00c54.tar.gz aspectj-30d1db184fd47c74014b1b87fc95e2d950d00c54.zip |
- IMessage-based compiler messages
Diffstat (limited to 'ajde')
-rw-r--r-- | ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java b/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java index 28540c6b0..467abcdb5 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java @@ -16,35 +16,20 @@ package org.aspectj.ajde.ui.swing; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; +import org.aspectj.util.LangUtil; /** * @author Mik Kersten */ public class CompilerMessage { - public String message; - public ISourceLocation sourceLocation; - public IMessage.Kind kind; + public final IMessage message; - public CompilerMessage(String message, IMessage.Kind kind) { + public CompilerMessage(IMessage message) { + LangUtil.throwIaxIfNull(message, "message"); this.message = message; - this.sourceLocation = null; - this.kind = kind; - } - - public CompilerMessage(String message, ISourceLocation sourceLocation, IMessage.Kind kind) { - this.message = message; - this.sourceLocation = sourceLocation; - this.kind = kind; } public String toString() { - if (sourceLocation != null) { - return sourceLocation.getSourceFile().getAbsolutePath() + ":" - + " " + message - + " at line " + sourceLocation.getLine() - + ", column " + sourceLocation.getColumn(); - } else { - return message; - } + return message.toString(); } } |