From 7f3501bfabd4c8b305ca7b0b750b5a6713b9735b Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 13 Aug 2009 17:29:15 +0000 Subject: [PATCH] 286539: test and fix (decanno type in model) --- .../pr286539/base/src/p/q/Aspect.java | 26 +++++++++++++ .../tools/MultiProjectIncrementalTests.java | 39 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 tests/multiIncremental/pr286539/base/src/p/q/Aspect.java diff --git a/tests/multiIncremental/pr286539/base/src/p/q/Aspect.java b/tests/multiIncremental/pr286539/base/src/p/q/Aspect.java new file mode 100644 index 000000000..5b33da10d --- /dev/null +++ b/tests/multiIncremental/pr286539/base/src/p/q/Aspect.java @@ -0,0 +1,26 @@ +package p.q.r; +import java.lang.annotation.*; + +aspect Asp { + +declare parents: C implements p.q.r.Int; +declare parents: C implements Int; +declare @type: C: @Foo; +declare @type: C: @p.q.r.Goo; + +declare @field: int C.i: @Foo; +declare @method: void C.m(): @Foo; +declare @constructor: new(): @Foo; + +} + +@Retention(RetentionPolicy.RUNTIME) @interface Foo {} +@Retention(RetentionPolicy.RUNTIME) @interface Goo {} + +interface Int {} + +class C { + int i; + void m() {} + C() {} +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 9e01a5694..5d2430eda 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -138,6 +138,45 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa // printModel(cli); // } + // Testing that declare annotation model entries preserve the fully qualified type of the annotation + public void testDecAnnoState_pr286539() throws Exception { + String p = "pr286539"; + initialiseProject(p); + build(p); + printModel(p); + IProgramElement decpPE = getModelFor(p).getHierarchy().findElementForHandle( + "=pr286539