From 281b698886b721aef7b15f356b0a4a50a2da7edf Mon Sep 17 00:00:00 2001 From: mkersten Date: Wed, 10 Mar 2004 03:53:55 +0000 Subject: [PATCH] Minor cleanup of build cancelling. --- .../aspectj/ajde/internal/BuildNotifierAdapter.java | 11 +++++++---- .../org/aspectj/ajde/internal/CompilerAdapter.java | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) 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); -- 2.39.5