From: wisberg Date: Wed, 30 Apr 2003 02:36:45 +0000 (+0000) Subject: - IMessage-based compiler messages X-Git-Tag: V1_1_0_RC2~113 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=30d1db184fd47c74014b1b87fc95e2d950d00c54;p=aspectj.git - IMessage-based compiler messages --- 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(); } }