]> source.dussan.org Git - aspectj.git/commitdiff
309402
authoraclement <aclement>
Fri, 16 Apr 2010 15:18:11 +0000 (15:18 +0000)
committeraclement <aclement>
Fri, 16 Apr 2010 15:18:11 +0000 (15:18 +0000)
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java

index d5568dc13b73a1984ff0b93d859decb9db442292..0905ff1c02120820e37bbd60a645f4997553966b 100644 (file)
@@ -170,6 +170,8 @@ public class Main {
        /** ReflectionFactory identifier for command (compiler) */
        protected String commandName;
 
+       protected ICommand command;
+
        /** client-set message sink */
        private IMessageHolder clientHolder;
 
@@ -198,6 +200,10 @@ public class Main {
                this.controller = controller;
        }
 
+       public void setCommand(ICommand command) {
+               this.command = command;
+       }
+
        /**
         * Run without throwing exceptions but optionally using System.exit(..). This sets up a message handler which emits messages
         * immediately, so report(boolean, IMessageHandler) only reports total number of errors or warnings.
@@ -346,7 +352,9 @@ public class Main {
                if (0 < holder.numMessages(IMessage.ERROR, true)) {
                        return;
                }
-               ICommand command = ReflectionFactory.makeCommand(commandName, holder);
+               if (command == null) {
+                       command = ReflectionFactory.makeCommand(commandName, holder);
+               }
                if (0 < holder.numMessages(IMessage.ERROR, true)) {
                        return;
                }