From: aclement Date: Fri, 3 Oct 2008 02:10:29 +0000 (+0000) Subject: 249551: cleanup by default X-Git-Tag: V1_6_2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9756f892ef86ddf3bc5bbb0cb326fb10736e8ef8;p=aspectj.git 249551: cleanup by default --- diff --git a/ajde.core/src/org/aspectj/ajde/core/AjCompiler.java b/ajde.core/src/org/aspectj/ajde/core/AjCompiler.java index 221f0b58c..758073d83 100644 --- a/ajde.core/src/org/aspectj/ajde/core/AjCompiler.java +++ b/ajde.core/src/org/aspectj/ajde/core/AjCompiler.java @@ -27,11 +27,11 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; */ public class AjCompiler { - private String compilerId; - private ICompilerConfiguration compilerConfig; - private IBuildProgressMonitor monitor; - private IBuildMessageHandler handler; - private AjdeCoreBuildManager buildManager; + private final String compilerId; + private final ICompilerConfiguration compilerConfig; + private final IBuildProgressMonitor monitor; + private final IBuildMessageHandler handler; + private final AjdeCoreBuildManager buildManager; /** * Creates a new AjCompiler for the given id, ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. None of @@ -88,6 +88,13 @@ public class AjCompiler { } } + /** + * Cleanup the compiler instance, ready for removal. + */ + public void cleanup() { + buildManager.cleanup(); + } + /** * Perform a full build. */ diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java index b4de526f3..c22248f46 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -45,10 +45,10 @@ import org.aspectj.util.LangUtil; */ public class AjdeCoreBuildManager { - private AjCompiler compiler; + private final AjCompiler compiler; private AjdeCoreBuildNotifierAdapter buildEventNotifier = null; - private AjBuildManager ajBuildManager; - private IMessageHandler msgHandlerAdapter; + private final AjBuildManager ajBuildManager; + private final IMessageHandler msgHandlerAdapter; public AjdeCoreBuildManager(AjCompiler compiler) { this.compiler = compiler; @@ -390,4 +390,8 @@ public class AjdeCoreBuildManager { public Object getCustomMungerFactory() { return ajBuildManager.getCustomMungerFactory(); } + + public void cleanup() { + ajBuildManager.cleanup(); + } }