Bug 53733 - pure-java classes doesn't notice about Inter-Type declarations
Summary: pure-java classes doesn't notice about Inter-Type declarations
Status: RESOLVED DUPLICATE of bug 74419
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.1.4   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 1.2.0   Edit
Assignee: Matt Chapman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 08:35 EST by Jesús Núñez CLA
Modified: 2004-10-27 10:04 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 Jesús Núñez CLA 2004-03-04 08:35:27 EST
Scenario:
- An aspect adds a public method (method 'm') to a Class A
-  In class B:
<code>
 A a = new A();
 a.m();
</code>

I can execute that (it runs correctly), but:
- It is displayed as compilation error if 'Analyze annotations while typing' 
enabled.
- The method 'm' is not listed in the Outline view of class A.
- The method 'm' is not listed in the list method of code assistant 
(a.<ctrl+space>)

Similar situatuin if the aspect makes the class implement an interface or 
extend a class.

Thanks.
Comment 1 Helen Beeken CLA 2004-10-27 07:01:28 EDT
The situation in Eclipse 3.0 with AJDT 1.2.0M1 is the following:

- The outline view for class A shows that there is an aspect declaration: 
expanding this node gives A1.m().

- with "Analyze annotations while typing" enabled then a compiler error is 
still there with "the method m() is undefined for type A"

- the method "m" is not listed in the list of methods of code assist (bug 
74419 is open to look solely at code assist) 

Thanks, Helen
Comment 2 Matt Chapman CLA 2004-10-27 10:04:35 EDT
The eager parsing / red squiggles issue is well known, which is why the
preferences wizard suggests you disable it. This seems to be already covered by
bug 24064

As Helen says the outline view shows the aspect declaration for class A as a
separate node. We think this is clearer than just adding it as a method in A. It
is usually better to think of the intertype method as being encapsulated by the
aspect itself, rather than being physically inserted into class A.

It would be useful if the code assist did complete against the intertype method
- bug 74419 remains open for this issue.

I think that covers everything, I'm therefore marking this as a dup of 74419.

*** This bug has been marked as a duplicate of 74419 ***