From: mkersten Date: Wed, 10 Mar 2004 03:53:55 +0000 (+0000) Subject: Minor cleanup of build cancelling. X-Git-Tag: v_preCompileLoopAlteration~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=281b698886b721aef7b15f356b0a4a50a2da7edf;p=aspectj.git Minor cleanup of build cancelling. --- diff --git a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java index 98c15040b..e1288e293 100644 --- a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java @@ -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) { diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 65f769299..1df25e3f7 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -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);