From: aclement Date: Tue, 24 Mar 2009 01:54:43 +0000 (+0000) Subject: 265993: more jdt like handles X-Git-Tag: V1_6_4~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=446370d3a25285bc20bcc670dc9cf57c0504c29f;p=aspectj.git 265993: more jdt like handles --- diff --git a/tests/multiIncremental/pr265993/base/src/A.java b/tests/multiIncremental/pr265993/base/src/A.java new file mode 100644 index 000000000..dd6f2ae5e --- /dev/null +++ b/tests/multiIncremental/pr265993/base/src/A.java @@ -0,0 +1,18 @@ +import java.util.Map; import java.util.List; +public class A { + public void m(String s1,java.lang.String s2) { + } + public void m2(List l) {} + public void m3(java.util.ArrayList l) {} + + public void m4(Map m) {} + public void m5(java.util.Map m) {} // parameterized qualified + public void m6(Map mm) {} // single parameterized with array + public void m7(int[] mm) {} // primitive array + public void m8(java.lang.String[] mm) {} + public void m9(String[] mm) {} + public void m10(List[][] m) {} + public void m11(java.util.List m) {} + public void m12(T[] m) {} + +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index ffb15c619..e3a5f3e38 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -985,6 +985,30 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa assertEquals("=AspectPath4/binaries<(Asp2.class}Asp2&before", findElementAtLine(root, 16).getHandleIdentifier()); } + public void testHandleQualification_pr265993() throws IOException { + String p = "pr265993"; + initialiseProject(p); + build(p); + IProgramElement root = getModelFor(p).getHierarchy().getRoot(); + dumptree(getModelFor(p).getHierarchy().getRoot(), 0); + PrintWriter pw = new PrintWriter(System.out); + getModelFor(p).dumprels(pw); + pw.flush(); + assertEquals("=pr265993<{A.java[A~m~QString;~Qjava.lang.String;", findElementAtLine(root, 3).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m2~QList;", findElementAtLine(root, 5).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m3~Qjava.util.ArrayList;", findElementAtLine(root, 6).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m4~QMap\\;", findElementAtLine(root, 8).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m5~Qjava.util.Map\\;", findElementAtLine(root, 9) + .getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m6~QMap\\<\\[IQList;>;", findElementAtLine(root, 10).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m7~\\[I", findElementAtLine(root, 11).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m8~\\[Qjava.lang.String;", findElementAtLine(root, 12).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m9~\\[QString;", findElementAtLine(root, 13).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m10~\\[\\[QList\\;", findElementAtLine(root, 14).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m11~Qjava.util.List\\;", findElementAtLine(root, 15).getHandleIdentifier()); + assertEquals("=pr265993<{A.java[A~m12~\\[TT;", findElementAtLine(root, 16).getHandleIdentifier()); + } + /** * A change is made to an aspect on the aspectpath (staticinitialization() advice is added) for another project. *