From 3b83eaeadfb08db55db04497c7a22478058e01a0 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 5 Aug 2011 16:23:25 +0000 Subject: [PATCH] minimalModel ON by default. demotion ON by default (for AJDT as well as LTW) --- .../ajde/core/tests/model/AsmDeclarationsTests.java | 5 +++-- .../aspectj/ajde/core/tests/model/StructureModelTests.java | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/AsmDeclarationsTests.java b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/AsmDeclarationsTests.java index 046bd6688..d64704d54 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/AsmDeclarationsTests.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/AsmDeclarationsTests.java @@ -31,6 +31,7 @@ public class AsmDeclarationsTests extends AjdeCoreTestCase { initialiseProject("coverage"); compilerConfig = (TestCompilerConfiguration) getCompiler().getCompilerConfiguration(); compilerConfig.setProjectSourceFiles(getSourceFileList(files)); + compilerConfig.setNonStandardOptions("-Xset:minimalModel=false"); doBuild(); manager = AsmManager.lastActiveStructureModel; model = AsmManager.lastActiveStructureModel.getHierarchy(); @@ -52,8 +53,8 @@ public class AsmDeclarationsTests extends AjdeCoreTestCase { IProgramElement packageAspect = model.findElementForType(null, "AdviceNamingCoverage"); assertNotNull(packageAspect); assertEquals(IProgramElement.Accessibility.PACKAGE, packageAspect.getAccessibility()); - assertEquals("aspect should not have public in it's signature", "aspect AdviceNamingCoverage", packageAspect - .getSourceSignature()); + assertEquals("aspect should not have public in it's signature", "aspect AdviceNamingCoverage", + packageAspect.getSourceSignature()); } public void testStaticModifiers() { diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java index 249b9615a..e6f190437 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java @@ -42,6 +42,7 @@ public class StructureModelTests extends AjdeCoreTestCase { initialiseProject("figures-coverage"); compilerConfig = (TestCompilerConfiguration) getCompiler().getCompilerConfiguration(); compilerConfig.setProjectSourceFiles(getSourceFileList(files)); + compilerConfig.setNonStandardOptions("-Xset:minimalModel=false"); doBuild(); manager = AsmManager.lastActiveStructureModel; } @@ -65,7 +66,7 @@ public class StructureModelTests extends AjdeCoreTestCase { IProgramElement node = manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath()); assertTrue("find result", node != null); IProgramElement pNode = (IProgramElement) (node).getChildren().get(3); - assertEquals(IProgramElement.Kind.ASPECT,pNode.getKind()); + assertEquals(IProgramElement.Kind.ASPECT, pNode.getKind()); IProgramElement pointcut = (IProgramElement) pNode.getChildren().get(0); assertTrue("kind", pointcut.getKind().equals(IProgramElement.Kind.POINTCUT)); assertTrue("found node: " + pointcut.getName(), pointcut.toLabelString().equals("testptct()")); @@ -115,7 +116,7 @@ public class StructureModelTests extends AjdeCoreTestCase { } private void testModelIntegrityHelper(IProgramElement node) throws Exception { - for (Iterator it = node.getChildren().iterator(); it.hasNext();) { + for (Iterator it = node.getChildren().iterator(); it.hasNext();) { IProgramElement child = (IProgramElement) it.next(); if (node == child.getParent()) { testModelIntegrityHelper(child); @@ -130,7 +131,7 @@ public class StructureModelTests extends AjdeCoreTestCase { public void preProcess(IProgramElement node) { if (node.getChildren() == null) return; - for (Iterator it = node.getChildren().iterator(); it.hasNext();) { + for (Iterator it = node.getChildren().iterator(); it.hasNext();) { if (it.next() == null) throw new NullPointerException("null child on node: " + node.getName()); } -- 2.39.5