]> source.dussan.org Git - aspectj.git/commitdiff
minimalModel ON by default. demotion ON by default (for AJDT as well as LTW)
authoraclement <aclement>
Fri, 5 Aug 2011 16:23:25 +0000 (16:23 +0000)
committeraclement <aclement>
Fri, 5 Aug 2011 16:23:25 +0000 (16:23 +0000)
ajde.core/testsrc/org/aspectj/ajde/core/tests/model/AsmDeclarationsTests.java
ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java

index 046bd6688dc5ab7c85081336451a4732b5f2a863..d64704d54b7347fdbbd415d66a91a519a90b391e 100644 (file)
@@ -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() {
index 249b9615ad627b35dc77b182f2e2a9ba7fd36e35..e6f190437d966b203c8f6f3e71c0ad557dd65c2e 100644 (file)
@@ -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<IProgramElement> 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<IProgramElement> it = node.getChildren().iterator(); it.hasNext();) {
                                        if (it.next() == null)
                                                throw new NullPointerException("null child on node: " + node.getName());
                                }