History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-4755
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Peter Gromov
Reporter: Keith Lea
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Constructors and factory methods should be shown together in completion popup

Created: 20 Nov 05 10:09   Updated: 29 Oct 08 13:31
Component/s: Editor. Code Completion
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 4,049
Severity: High


 Description  « Hide
Currently I think it's silly and poorly usable to show constructors after "new" and factory methods wherever the type of the factory method is expected. I don't know a good solution offhand but some obvious solutions are:

1. Show factory methods in "new" completion popup, and remove "new" if one is selected for completion. This would be confusing to some people.
2. Show "new xx" for each constructor in normal smarttype completion. This would cause clutter for the common case of pressing ctrl+shift+space to complete a field or variable name.
3. Create new form of completion for instantiation. People already say IDEA has too many completions.

All 3 solutions have bad parts. I'll think about this issue.



 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 20 Nov 05 15:57
1. is really weird. I don't think people would accept that. But there are even more options:

4. Show constructors only if there's no other possible completion. Not sure how useful that really is.
5. Introduce smart completion "stages": Show constructors when pressing the shortcut twice. Show transitive possibilities (IDEA-5870) when pressing it three times, etc.

Looks like IDEA needs a "do-what-I-mean" button


Peter Gromov - 29 Oct 08 13:30
The behaviour could be as follows (assume that we want something of type Foo):
1. if we press smart completion after 'Foo.', suggest also accessible constructors of Foo (but, if this happes to be the obly variant, don't autocomplete it).
2. After 'new', suggest also factory methods available in class Foo, don't autocomplete them as well.

Both things could appear on second smart completion, or on first, not sure yet.
Next smart completion invocations (second or third) could suggest constructors and factory methods from descendants (IDEABKL-525) or even projectwide (this applies only to factory methods).


Peter Gromov - 29 Oct 08 13:31
I meant IDEABKL-5251