summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-14 04:29:18 +0000
committerwisberg <wisberg>2003-05-14 04:29:18 +0000
commit58570a499ae31b5774352910d5927e1ea5245fdb (patch)
tree38dc4f2bd86be29c1787a3ec5286707ad196350a /org.aspectj.ajdt.core
parentd3a0191c44ae6711d880d34eaffd6797ae857b2b (diff)
downloadaspectj-58570a499ae31b5774352910d5927e1ea5245fdb.tar.gz
aspectj-58570a499ae31b5774352910d5927e1ea5245fdb.zip
patch mentioned on the list for detecting errs in incremental command line
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java19
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java3
2 files changed, 20 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java
index 10d3279c4..d1444a4e0 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java
@@ -121,7 +121,18 @@ public class AjdtCommand implements ICommand {
return false;
}
- /** @throws AbortException on error after handling message */
+ /**
+ * This creates a build configuration for the arguments.
+ * Errors reported to the handler:
+ * <ol>
+ * <li>The parser detects some directly</li>
+ * <li>The parser grabs some from the error stream
+ * emitted by its superclass</li>
+ * <li>The configuration has a self-test</li>
+ * </ol>
+ * In the latter two cases, the errors do not have
+ * a source location context for locating the error.
+ */
public static AjBuildConfig genBuildConfig(String[] args, CountingMessageHandler handler) {
BuildArgParser parser = new BuildArgParser();
AjBuildConfig config = parser.genBuildConfig(args, handler);
@@ -132,6 +143,12 @@ public class AjdtCommand implements ICommand {
IMessage m = new Message(message, kind, null, null);
handler.handleMessage(m);
}
+ message = config.configErrors();
+ if (null != message) {
+ IMessage.Kind kind = inferKind(message);
+ IMessage m = new Message(message, kind, null, null);
+ handler.handleMessage(m);
+ }
return config;
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
index 01acc2966..9a9ac69d6 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
@@ -502,9 +502,10 @@ public class Main {
*/
public String[] init(String[] args, IMessageHandler sink) {
running = true;
+ String[] unused;
if (!LangUtil.isEmpty(args)) {
String[][] options = LangUtil.copyStrings(OPTIONS);
- args = LangUtil.extractOptions(args, options);
+ unused = LangUtil.extractOptions(args, options);
incremental = (null != options[0][0]);
if (null != options[1][0]) {
File file = new File(options[1][1]);