diff options
-rw-r--r-- | ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java | 16 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjStateTest.java | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 8bb83599e..13dc99cf0 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -88,9 +88,7 @@ public class CompilerAdapter { public boolean compile(String configFile, BuildProgressMonitor progressMonitor, boolean buildModel) { if (configFile == null) { - Ajde.getDefault().getErrorHandler().handleError( - "Tried to build null config file." - ); + Ajde.getDefault().getErrorHandler().handleError("Tried to build null config file."); } init(); try { @@ -113,14 +111,17 @@ public class CompilerAdapter { boolean incrementalEnabled = buildConfig.isIncrementalMode() || buildConfig.isIncrementalFileMode(); + boolean successfulBuild; if (incrementalEnabled && nextBuild) { - return buildManager.incrementalBuild(buildConfig, messageHandler); + successfulBuild = buildManager.incrementalBuild(buildConfig, messageHandler); } else { if (incrementalEnabled) { nextBuild = incrementalEnabled; } - return buildManager.batchBuild(buildConfig, messageHandler); + successfulBuild = buildManager.batchBuild(buildConfig, messageHandler); } + IncrementalStateManager.recordSuccessfulBuild(configFile,buildManager.getState()); + return successfulBuild; // } catch (OperationCanceledException ce) { // Ajde.getDefault().getErrorHandler().handleWarning( // "build cancelled by user"); @@ -629,4 +630,9 @@ public class CompilerAdapter { this.buildNotifierAdapter = buildNotifierAdapter; } } + + public void setState(AjState buildState) { + buildManager.setState(buildState); + buildManager.setStructureModel(buildState.getStructureModel()); + } } diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjStateTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjStateTest.java index 04b06a145..7df629835 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjStateTest.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjStateTest.java @@ -120,6 +120,6 @@ public class AjStateTest extends TestCase { oldConfig.setInJars(ij); newConfig.setInJars(new ArrayList(ij)); aRightState.prepareForNextBuild(oldConfig); - aRightState.successfulCompile(oldConfig); + aRightState.successfulCompile(oldConfig,true); } } |