aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-20 10:24:57 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-20 10:24:57 +0700
commit31b2d60b897d318bfbffde2d78dbc288f85db191 (patch)
treeb31e667d37e23dcb6ec0ffe7efac2348c0672df2 /testing
parente51c43b9e3970aab098a8d17c1057f660732a584 (diff)
downloadaspectj-31b2d60b897d318bfbffde2d78dbc288f85db191.tar.gz
aspectj-31b2d60b897d318bfbffde2d78dbc288f85db191.zip
Improve usage text, error and warning output in batch compiler
- Usage texts are now printed to stdOut, no longer stdErr. - 'java ...Main -?' no longer prints usage text twice (once to stdOut and then again to stdErr). - AjdtCommand.inferKind: Usage texts are no longer mis-identified as warnings or errors just because they contain substrings "warning" or "error". Matching is now more precise, looking for "[warning]" and "[error]". But in that case the method would not be called anyway because errors and warnings are identified in other ways already. As a fall-back, the categories IMessage.ERROR and IMessage.WARNING still exist in the method. - In case of compile errors, no usage message is printed anymore, because previously the user had to scroll up a lot in order to see the actual messages. This is also in line with ECJ. The same is true for warnings, but it was like this in Ajc already. - AjdtCommand.inferKind: There is a new category IMessage.USAGE especially for AspectJ usage texts, which will be identified by string matching and then correctly handled (i.e. printed to stdOut, not stdErr). - Usage text printing is no longer done in AspectJ but in the AspectJ "shadows" fork of JDT. This helps to get rid of some now obsolete code here. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing')
-rw-r--r--testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java b/testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java
index 970a1c457..594c4b395 100644
--- a/testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java
+++ b/testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java
@@ -205,6 +205,13 @@ public class SoftMessage implements IMessage {
return kind == IMessage.DEBUG;
}
+ /**
+ * @return true if kind == IMessage.USAGE
+ */
+ public boolean isUsage() {
+ return kind == IMessage.USAGE;
+ }
+
/**
* @return true if kind == IMessage.INFO
*/