Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326839 - [otmodel][assist] completion proposals for implicitly inherited elements have no additional info
Summary: [otmodel][assist] completion proposals for implicitly inherited elements have...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7.1   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 0.8 M3   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-02 08:31 EDT by Stephan Herrmann CLA
Modified: 2010-11-13 17:44 EST (History)
0 users

See Also:


Attachments
tests & fix (30.34 KB, patch)
2010-10-02 13:37 EDT, Stephan Herrmann CLA
no flags Details | Diff
additional fix (3.39 KB, patch)
2010-10-04 18:45 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-10-02 08:31:38 EDT
When completing a method call via a phantom role no additional info
(i.e., java doc) is displayed, because the type cannot be resolved
in the model.

It seems that JavaProject must be able to create PhantonType instances
accordingly, which may have impact also for other functions.
Comment 1 Stephan Herrmann CLA 2010-10-02 13:37:11 EDT
Created attachment 180110 [details]
tests & fix

The immediate issue is fixed by making JavaProject.findType smarter:
If member type is not found locally, also climb up the team-super-chain
to find an inherited role, collecting all candidates for creation of
a PhantomType.

PhantomType had to be extended to handle multiple tsuper roles.
This is necessary so that method lookup will be able to find methods
from all tsupers.

Note, that testNewExpression1() throws some JavaModelExceptions(not present)
because getElementInfo() is attempted on a SourceType representing a 
phantom role. This issue should be tracked separately.
Comment 2 Stephan Herrmann CLA 2010-10-02 13:56:53 EDT
Patch has been committed as r925 - r927
Comment 3 Stephan Herrmann CLA 2010-10-03 11:32:14 EDT
Field tests show that the following case is still not handled:
- role is real (=not phantom)
- method is inherited from tsuper

It shows that the copied method is used for the proposal,
from which no javadoc can be found.

Reopening.
Comment 4 Stephan Herrmann CLA 2010-10-04 18:45:01 EDT
Created attachment 180219 [details]
additional fix

This patch fixes the latest issue by using the copyInheritanceSrc 
during completion.

Test included.
Comment 5 Stephan Herrmann CLA 2010-10-04 18:52:48 EDT
additional fix has been committed as r935, r936

Note that the fix bug 326969 is required for some tests to pass.
Comment 6 Stephan Herrmann CLA 2010-11-10 19:17:41 EST
Verified for 0.8 M3 using build 201011100445