diff options
-rw-r--r-- | ajde/testsrc/org/aspectj/ajde/internal/AspectJBuildManagerTest.java | 9 | ||||
-rw-r--r-- | asm/src/org/aspectj/asm/AsmManager.java | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/internal/AspectJBuildManagerTest.java b/ajde/testsrc/org/aspectj/ajde/internal/AspectJBuildManagerTest.java index f94ff660f..108c17866 100644 --- a/ajde/testsrc/org/aspectj/ajde/internal/AspectJBuildManagerTest.java +++ b/ajde/testsrc/org/aspectj/ajde/internal/AspectJBuildManagerTest.java @@ -15,6 +15,8 @@ package org.aspectj.ajde.internal; import junit.framework.*; import org.aspectj.ajde.*; +import org.aspectj.asm.AsmManager; + import java.io.*; /** @@ -33,6 +35,8 @@ public class AspectJBuildManagerTest extends AjdeTestCase { } public void testSequence() { + AsmManager.dumpModelPostBuild=true; // or you wont get a .ajsym file + try { assertTrue("initialization", ideManager != null); assertTrue("compile of non-existing build config success", !testerBuildListener.getBuildSucceeded()); // XXX should fail? empty configs fail b/c no sources specified @@ -52,7 +56,10 @@ public class AspectJBuildManagerTest extends AjdeTestCase { file.delete(); } else { assertTrue("expected .ajsym" + file, false); - } + } + } finally { + AsmManager.dumpModelPostBuild=false; + } } protected void setUp() throws Exception { diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java index 9422d5f1e..3c998c1d0 100644 --- a/asm/src/org/aspectj/asm/AsmManager.java +++ b/asm/src/org/aspectj/asm/AsmManager.java @@ -41,6 +41,7 @@ public class AsmManager { private static boolean creatingModel = false; + public static boolean dumpModelPostBuild = false; // Dumping the model is expensive public static boolean attemptIncrementalModelRepairs = false; // for debugging ... @@ -78,7 +79,7 @@ public class AsmManager { public void fireModelUpdated() { notifyListeners(); - if (hierarchy.getConfigFile() != null) { + if (dumpModelPostBuild && hierarchy.getConfigFile() != null) { writeStructureModel(hierarchy.getConfigFile()); } } |