Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326397 - [5.0][content assist] Outer type missing when completing inner type arguments
Summary: [5.0][content assist] Outer type missing when completing inner type arguments
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 06:56 EDT by Niels CLA
Modified: 2020-02-12 10:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels CLA 2010-09-28 06:56:35 EDT
Build Identifier: 20100618-0524

Try to add the following partial field declaration to a top-level Java class (yeah don't ask why I want to do this in the first place, btw):

private final HashMap<Vertex, ArrayList<Point2D.Double>> traces = new 

now press ctrl+space, Eclipse will complete the declaration as:

private final HashMap<Vertex, ArrayList<Point2D.Double>> traces = new private final HashMap<Vertex, ArrayList<Double>>();

Instead of ArrayList<Point2D.Double>, Eclipse completes to ArrayList<Double>, inserting the inner class name only instead of the whole thing.

No biggie for me, as it's a bit of an exotic corner case, but I thought I'd report it anyway. 

Reproducible: Always

Steps to Reproduce:
1. Add partial declaration from description to a top-level Java class.
2. Have eclipse complete the declaration.
3. Note that the declaration is wrong, instead of `Point2D.Double`, `Double`, is inserted.
Comment 1 Niels CLA 2010-09-28 06:59:46 EDT
PS: the problem seems to appear only with nested types. For example, this completes just fine:

ArrayList<Point2D.Double> foo

This doesn't:

ArrayList<ArrayList<Point2D.Double>> foo
ArrayList<ArrayList<ArrayList<Point2D.Double>>>

etc.
Comment 2 Niels CLA 2010-09-28 07:07:34 EDT
The problem also appears in the following

traces.get(vertex).add( <ctrl+space>

code completion here will infer the add to be of the type add(Double), where in fact it's add(Point2D.Double). 

Hope that helps to track down the source.
Comment 3 Eclipse Genie CLA 2020-02-12 10:26:31 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.