Bug 121350 - [content assist] code completion ui: names of the methods and their return types is not aligned.
Summary: [content assist] code completion ui: names of the methods and their return ty...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1.1   Edit
Hardware: Other All
: P4 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-18 22:27 EST by Daniel Beck CLA
Modified: 2006-01-03 04:53 EST (History)
1 user (show)

See Also:


Attachments
Screenshot of the code completion menu, in eclipse, how it looks like now (20.58 KB, image/jpeg)
2005-12-18 22:28 EST, Daniel Beck CLA
no flags Details
mockup of code completion dialog (20.49 KB, image/jpeg)
2005-12-19 12:21 EST, Daniel Beck CLA
no flags Details
shows how the code completion dialog looks like in intellij IDEA. (136.33 KB, image/jpeg)
2005-12-19 12:22 EST, Daniel Beck CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Beck CLA 2005-12-18 22:27:11 EST
Then I use code completion (by pressing CTRL+SPACE), I got a list of method, associated with their return type.

The code completion menu looks like this: 

[icon1] nameOfTheMethod1 returnType1 ObjectWhereTheMethodIsDefined1
[icon2] foo22 returnType2 ObjectWhereTheMethodIsDefined2
[icon3] anotherMethod3 returnType3 ObjectWhereTheMethodIsDefined3

This makes it very difficult to search for a method by his return type. Searching for a method by his return type can be useful then someone doesn't know much about the API, since the return type also give information about what the method is actually doing.

I believe, the menu should look like this :

[icon1] nameOfTheMethod1     ObjectWhereTheMethodIsDefined1 returnType1  
[icon2] foo22                ObjectWhereTheMethodIsDefined2 returnType2  
[icon3] anotherMethod3       ObjectWhereTheMethodIsDefined3 returnType3
Comment 1 Daniel Beck CLA 2005-12-18 22:28:52 EST
Created attachment 31921 [details]
Screenshot of the code completion menu, in eclipse, how it looks like now
Comment 2 Dani Megert CLA 2005-12-19 05:00:26 EST
There are no plans to change this. Aligning makes the popup wider and moving the return type at the end is not a good idea since the return type is normally of a bigger interest than the defining type.
Comment 3 Daniel Beck CLA 2005-12-19 12:18:25 EST
Hello, 

* I believe, moving the return type at the end is a good idea since it is *more easy* to distinguish it from the name of the method, and the Object, since they are aligned - the user knows then where to look at. 

* Also, The popup will not be wider, if its size is adjusted according to the longest-line in the popup taking the most place. So, the popup would not take more place - but it would be more readable since the eclipse user would know, the return type is at the right. 

One IDE implementing this is intellij-IDEA, and I believe, code completion is clearer there. 

Since screenshot explain that much better, I joined two other screenshots. Screenshot 2 shows how the dialog from screenshot 1 should look like.
Screenshot 3 shows how code completion looks like in intellij IDEA. 

Comment 4 Daniel Beck CLA 2005-12-19 12:19:25 EST
Comment on attachment 31921 [details]
Screenshot of the code completion menu, in eclipse, how it looks like now

screenshot 1, how the dialog for the code completion looks in eclipse now.
Comment 5 Daniel Beck CLA 2005-12-19 12:21:16 EST
Created attachment 31960 [details]
mockup of code completion dialog

screenshot 2, shows how I believe the code completion dialog should look like
Comment 6 Daniel Beck CLA 2005-12-19 12:22:10 EST
Created attachment 31961 [details]
shows how the code completion dialog looks like in intellij IDEA.

screenshot 3, shows how the code completion dialog looks like in intellij IDEA.
Comment 7 Daniel Beck CLA 2005-12-19 13:01:13 EST
so, to make it clear, what I meant is  : 

1) To align the types and methods in the popup, because it is more easy to distinguish methods and types if they are aligned. 
That is also the reason why all dialog in you Operating system GUI, kde/gnome/windows/OSX are aligned.

2) Then reorder the types, so that the type that is important, i.e. the return type is at the right. This makes sense then the elements in the dialog are aligned because the column can then be more easily read.
Comment 8 Tom Hofmann CLA 2006-01-03 04:13:12 EST
+1 from my side
Comment 9 Tom Hofmann CLA 2006-01-03 04:53:06 EST
(In reply to comment #8)
> +1 from my side

To clarify: +1 for a more structured display of proposals. I don't really care whether return types and defining type are left or right aligned (I am not even interested in the defining type usually), but I think a tabular structure is well suited to display tabular data.

- leave defining type away?
- columnize return types and defining type
- space saving alternative to columns is using a different separator, for example using a colon to separate method and return type (consistent with what the outline does).