From: aclement Date: Tue, 6 Jan 2009 22:07:16 +0000 (+0000) Subject: 258206: package declaration support in the model X-Git-Tag: pre268419~241 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b604f27b616fe8679a28fe2f5daed62f8f22159c;p=aspectj.git 258206: package declaration support in the model --- 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