]> source.dussan.org Git - aspectj.git/commitdiff
Minor cleanup of build cancelling.
authormkersten <mkersten>
Wed, 10 Mar 2004 03:53:55 +0000 (03:53 +0000)
committermkersten <mkersten>
Wed, 10 Mar 2004 03:53:55 +0000 (03:53 +0000)
ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java
ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java

index 98c15040bd3b337e6c0e0b55e64238bf8eba0dbb..e1288e293c6b8bd732af4b4fff7b9547e54249bc 100644 (file)
@@ -15,18 +15,21 @@ package org.aspectj.ajde.internal;
 
 import org.aspectj.ajde.Ajde;
 import org.aspectj.ajde.BuildProgressMonitor;
+import org.aspectj.ajdt.internal.core.builder.AjBuildManager;
+import org.aspectj.bridge.AbortException;
 import org.aspectj.bridge.IProgressListener;
 
 public class BuildNotifierAdapter implements IProgressListener {
 
     private BuildProgressMonitor progressMonitor;
+    private AjBuildManager buildManager;
 //    private int numCompilationUnitPasses = 1;
 //    private int completedPasses = 0;
-       private boolean cancelled = false;
+       private boolean cancelRequested = false;
 
-       // ??? get rid of project coupling
-       public BuildNotifierAdapter(BuildProgressMonitor progressMonitor) {
+       public BuildNotifierAdapter(BuildProgressMonitor progressMonitor, AjBuildManager buildManager) {
                this.progressMonitor = progressMonitor;
+               this.buildManager = buildManager;
        }
   
        public void begin() {
@@ -36,7 +39,7 @@ public class BuildNotifierAdapter implements IProgressListener {
 
        public void cancelBuild() {
                progressMonitor.setProgressText("cancelling build...");  
-               cancelled = true;
+               cancelRequested = true;
        }
 
        public void setProgress(double percentDone) {
index 65f769299afb1df22d4496553ba4513ddd843958..1df25e3f7e2437c812f7227e8d24908a0a0486fe 100644 (file)
@@ -85,7 +85,7 @@ public class CompilerAdapter {
                        if (null == buildConfig) {
                 return false;
                        }
-                       currNotifier = new BuildNotifierAdapter(progressMonitor);               
+                       currNotifier = new BuildNotifierAdapter(progressMonitor, buildManager);         
                        buildManager.setProgressListener(currNotifier);
                        messageHandler.setBuildNotifierAdapter(currNotifier);