Bug 549308 - No property / method proposal for array of objects
Summary: No property / method proposal for array of objects
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dawid Pakula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-16 08:22 EDT by Thomas Lallement CLA
Modified: 2020-05-14 10:17 EDT (History)
2 users (show)

See Also:


Attachments
Code folding not working (array of object) (22.22 KB, image/png)
2019-07-16 08:22 EDT, Thomas Lallement CLA
no flags Details
Code folding working (array of object) (49.03 KB, image/png)
2019-07-16 08:22 EDT, Thomas Lallement CLA
no flags Details
Sample (1.84 KB, application/zip)
2019-07-16 11:30 EDT, Thomas Lallement CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lallement CLA 2019-07-16 08:22:22 EDT
Created attachment 279286 [details]
Code folding not working (array of object)

Hello,

As you can see on my attachments, there is no property / method proposal when we add a comment with Object[] notation.
Comment 1 Thomas Lallement CLA 2019-07-16 08:22:47 EDT
Created attachment 279287 [details]
Code folding working (array of object)
Comment 2 Thierry BLIND CLA 2019-07-16 10:34:43 EDT
Hi Thomas,
could you provide us some code example to play with?

Thank you,
Thierry.
Comment 3 Thomas Lallement CLA 2019-07-16 11:30:02 EDT
Created attachment 279292 [details]
Sample
Comment 4 Thomas Lallement CLA 2019-07-16 11:32:12 EDT
I attached a small code example. 

Please note that all works when class Foo have the same namespace than Bar.
Comment 5 Thierry BLIND CLA 2019-07-16 11:44:19 EDT
Ok thank you Thomas,
I add Dawid to the CC list, I think he wrote some for code about CA & arrays, maybe he can have a look and be a better help than me ;)

Thierry.
Comment 6 Dawid Pakula CLA 2019-07-16 15:15:08 EDT
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=533136
Comment 7 Dawid Pakula CLA 2019-08-03 09:34:33 EDT
I see two problems:
1. Information about array from @var comments is lost during inferencing
2. PDT doesn't handle correctly references inside parenthesis (Type|Type)[] - another bug
Comment 8 Eclipse Genie CLA 2019-08-03 10:49:51 EDT
New Gerrit change created: https://git.eclipse.org/r/146998
Comment 11 Thierry BLIND CLA 2019-08-05 08:49:43 EDT
(In reply to Eclipse Genie from comment #10)
> Gerrit change https://git.eclipse.org/r/147045 was merged to [master].
> Commit:
> http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/
> ?id=187d28887784772d2b065590f0ca19593758a81b

Hi Dawid,
thank you for the bug fix ;)

I just added some more unit tests and fixed your initial unit test to use a /*...*/ comment and not a /**...*/ PHPDoc comment, because we're inside a method (PHPDocs are no intended to be used inside methods, and anyway not fully "supported" by PDT when misplaced).

Thierry.