Bug 91090 - declare warning with staticinitialization matching an aspect doesn't appear correctly
Summary: declare warning with staticinitialization matching an aspect doesn't appear c...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M3   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-12 05:36 EDT by Helen Beeken CLA
Modified: 2005-08-13 16:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helen Beeken CLA 2005-04-12 05:36:04 EDT
When you declare a warning using a staticinitialization pointcut which matches 
the aspect itself, then the aspect doesn't have the "matches declare" 
relationship on it in the structure model (the declare warning does have that 
it matches the aspect).

To recreate: create an AJ project which contains one file A.aj (in a package 
pack) with the following contents:

----------------------------------------------------------------------
package pack;

public aspect A {
	
	declare warning : staticinitialization( * ) : "...";

}

//aspect X {
//	
//}
//
//class OtherClass {
//}

----------------------------------------------------------------------

Then, look at the contents of the Structure Model view and you see that
the correct nodes do not appear (A doesn't have the "matches declare" node, 
but the declare warning does have the "matches" node).

Note that classes do have the "matches declare" node, so aspects should too.

Moreover, debug info about the structure model:

=== MODEL STATUS REPORT ========= After a batch build
.generated.lst  [build configuration file]
  pack  [package]
    A.aj  [java source file]
      import declarations  [import reference]
      A  [aspect]
        declare warning: "..."  [declare warning]
=== END OF MODEL REPORT =========
=== RELATIONSHIPS REPORT ========= After a batch build
Hid:1:(targets=1) 
C:\eclipse_installations\ajdt_3_0_0_development\eclipse\runtim
e-workspace-XRef\ImageDecoratorTest\src\pack\A.aj|3|0|0 (matches declare) 
C:\ecl
ipse_installations\ajdt_3_0_0_development\eclipse\runtime-workspace-
XRef\ImageDe
coratorTest\src\pack\A.aj|5|0|40
Hid:2:(targets=1) 
C:\eclipse_installations\ajdt_3_0_0_development\eclipse\runtim
e-workspace-XRef\ImageDecoratorTest\src\pack\A.aj|5|0|40 (matched by) 
C:\eclipse
_installations\ajdt_3_0_0_development\eclipse\runtime-workspace-
XRef\ImageDecora
torTest\src\pack\A.aj|3|0|0
=== END OF RELATIONSHIPS REPORT ==
=== Properties of the model and relationships map =====
build configuration file=1
package=1
FileMapSize=1
aspect=1
RelationshipMapSize=2
java source file=1
import reference=1
declare warning=1
Comment 1 Andrew Clement CLA 2005-05-25 15:56:31 EDT
havent I already fixed this?  to confirm and fix if I havent for M3.
Comment 2 Helen Beeken CLA 2005-06-03 08:55:58 EDT
Yes, I've just tried this with AJDT build 20050602174752 and I'm no longer
seeing the problem.
Comment 3 Adrian Colyer CLA 2005-08-13 16:51:31 EDT
fixed in June but never closed...