ensure messages are associated with source wherever possibletags/Root_ajdt_support
@@ -42,6 +42,11 @@ public class Message implements IMessage { | |||
location); | |||
} | |||
public Message(String message, ISourceLocation location, boolean isError, ISourceLocation[] extraSourceLocations) { | |||
this(message, "",(isError ? IMessage.ERROR : IMessage.WARNING), location, null, | |||
(extraSourceLocations.length > 0 ? extraSourceLocations : null)); | |||
} | |||
/** | |||
* Create a message, handling null values for message and kind | |||
* if thrown is not null. |
@@ -133,9 +133,11 @@ public class SourceLocation implements ISourceLocation, java.io.Serializable { | |||
} | |||
if (sourceFile != ISourceLocation.NO_FILE) { | |||
sb.append(sourceFile.getPath()); | |||
} | |||
if (startLine > 0) { | |||
sb.append(":"); | |||
sb.append(startLine); //"" + startLine + "-" + endLine); | |||
} | |||
sb.append(startLine); //"" + startLine + "-" + endLine); | |||
if (!noColumn) { | |||
sb.append(":" + column); | |||
} |