Bug 93119 - code assist: proposals for wildcard types
Summary: code assist: proposals for wildcard types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 10:10 EDT by Tom Hofmann CLA
Modified: 2005-05-27 09:06 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 Tom Hofmann CLA 2005-04-28 10:10:13 EDT
I20050426-1700

- have this code (caret at |):

package codeAssist;

import java.util.List ;

public class Extends {
	void m() {
		List <? |>
	}
}

- invoke code assist
> actual: the only proposed item is the CU's type (Extends)
< expected: there are exactly two proposals: 'extends' and 'super'

- alternatively, press 'e' and invoke code assist

> actual: dozens of type proposals are proposed (and two template proposals, but
that is not a jdt-core problem)
< expected: only 'extends' is proposed.
Comment 1 David Audel CLA 2005-05-26 10:22:45 EDT
Fixed and test added
  GenericsCompletionParserTest#test0186() -> test0187()
  CompletionTests_1_5#test0217() - test0220()
Comment 2 Maxime Daniel CLA 2005-05-27 04:05:58 EDT
Build I20050526-2000-win32:
- List <?|> and List <? |> ring a bell (no proposal at all, pipe figures
insertion point while invoking code assist); this is at mismatch with the
initial request, but consistent with code assist behavior in other places; I
opened a separate bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=96918) to
track this enhancement;
- List <? e|> yields extends, plus a couple of 'else' templates (don't know if
this is avoidable without qualifying templates, which may prove
expensive/difficult to specify); note that no classes or interfaces show up,
which is better than 3.1M7 behavior and the main subject of the bug;
- List <? s|> yields super, plus a series of templates.
Added tests passed successfully.
I would then consider this as verified, modulo a new enhancement request for
extends+super completion in the context of List<?|> or List<? >.
Comment 3 Tom Hofmann CLA 2005-05-27 04:30:17 EDT
filed bug 96924 about the misleading templates - they should at least be ranked
lower than the correct keywords.