diff options
author | aclement <aclement> | 2009-01-06 22:07:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-06 22:07:16 +0000 |
commit | b604f27b616fe8679a28fe2f5daed62f8f22159c (patch) | |
tree | 5c6fc6992b8e0d14882f0b0832b76085aa90ef53 | |
parent | 32554ee4a874dcaee989ea8141073c3280c6b07f (diff) | |
download | aspectj-b604f27b616fe8679a28fe2f5daed62f8f22159c.tar.gz aspectj-b604f27b616fe8679a28fe2f5daed62f8f22159c.zip |
258206: package declaration support in the model
-rw-r--r-- | tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 207a924bf..639b54ec0 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -247,6 +247,35 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa // incomplete } + /** + * Test what is in the model for package declarations and import statements. Package Declaration nodes are new + * in AspectJ 1.6.4. Import statements are contained with an 'import references' node. + */ + public void testImportHandles() { + String p = "Imports"; + initialiseProject(p); + build(p); + + IProgramElement root = getModelFor(p).getHierarchy().getRoot(); + + // Looking for 'package p.q' + IProgramElement ipe = findElementAtLine(root, 1); + ipe = (IProgramElement)ipe.getChildren().get(0); // package decl is first entry in the type + System.out.println(ipe.getHandleIdentifier()+" "+ipe.getKind()); + assertEquals(IProgramElement.Kind.PACKAGE_DECLARATION, ipe.getKind()); + assertEquals("=Imports<p.q*Example.aj%p.q", ipe.getHandleIdentifier()); + assertEquals("package p.q;", ipe.getSourceSignature()); + assertEquals(ipe.getSourceLocation().getOffset(),8); // "package p.q" - location of p.q + + + // Looking for import containing containing string and integer + ipe = findElementAtLine(root, 3); // first import + ipe = ipe.getParent(); // imports container + System.out.println(ipe.getHandleIdentifier()+" "+ipe.getKind()); + dumptree(getModelFor(p).getHierarchy().getRoot(), 0); + assertEquals("=Imports<p.q*Example.aj#", ipe.getHandleIdentifier()); + } + public void testAdvisingCallJoinpointsInITDS_pr253067() { String p = "pr253067"; initialiseProject(p); @@ -342,6 +371,18 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa checkWasntFullBuild(); } + + public void testIncrementalBuildsWithItds_pr259528() { + String p = "pr259528"; + AjdeInteractionTestbed.VERBOSE = true; + initialiseProject(p); + build(p); + checkWasFullBuild(); + alter(p, "inc1"); + build(p); + checkWasntFullBuild(); + } + public void testAdviceHandlesAreJDTCompatible() { String p = "AdviceHandles"; initialiseProject(p); @@ -1137,7 +1178,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa checkWasFullBuild(); alter("PR117882", "inc1"); build("PR117882"); - checkWasFullBuild(); // back to the source for an aspect + // This should be an incremental build now - because of the changes under 259649 + checkWasntFullBuild(); // back to the source for an aspect // AjdeInteractionTestbed.VERBOSE=false; // AjdeInteractionTestbed.configureBuildStructureModel(false); } |