Bug 340876 - [preferences][content assist] Request for more flexible configuration of content assist lists
Summary: [preferences][content assist] Request for more flexible configuration of cont...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-03-24 11:37 EDT by Marcel Bruch CLA
Modified: 2014-11-03 18:57 EST (History)
9 users (show)

See Also:


Attachments
Alternative view on how to configure content assist lists (76.80 KB, image/png)
2011-03-24 11:38 EDT, Marcel Bruch CLA
no flags Details
Second, more compact configuration of content assist (78.48 KB, image/png)
2011-03-24 11:42 EDT, Marcel Bruch CLA
no flags Details
Patch for prototype of new content assist lists (178.63 KB, patch)
2011-07-18 09:57 EDT, Thomas Schlosser CLA
no flags Details | Diff
Icon needed to complete "org.eclipse.jdt.ui_3.7.1_patch" (163 bytes, image/gif)
2011-07-18 09:59 EDT, Thomas Schlosser CLA
no flags Details
Icon needed to complete "org.eclipse.jdt.ui_3.7.1_patch" (163 bytes, image/gif)
2011-07-18 10:00 EDT, Thomas Schlosser CLA
no flags Details
New 3.8.0-Patch for prototype of new content assist lists (200.63 KB, patch)
2011-08-11 15:34 EDT, Thomas Schlosser CLA
daniel_megert: review-
Details | Diff
patch for an other prototype for the content assist list for Eclipse 3.8 from Freise (101.22 KB, patch)
2011-09-06 14:03 EDT, Gerrit Hendrik Freise CLA
daniel_megert: review-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bruch CLA 2011-03-24 11:37:36 EDT
The current configuration options for JDT content assist lists are bit limited. Currently there are two kinds of lists: (i) The 'default' content assist list that shows a combined set of proposals of several completion engines (as configured in Java >> Editor >> Content Assist >> Advanced) and (ii) content assist lists that show the proposals of just one category.

I would like to ask JDT team to allow for a more flexible configuration of content assist.

The behavior of the 'default' list is great since it allows a user to decide individually which proposal engines he wants to see on the first page. But the subsequent lists allow just one category. Would it be possible to allow users to define any arbitrary number of content assist lists with any combination of proposal engines?

This feature would enhance usability in Eclipse in the case of having many code completion engines installed. For instance, Eclipse Code Recommenders currently adds five more completion engines to Eclipse which results in a rather large number of lists to cycle through until you get to the last one.

I'll attach a few figures as starting point for as starting points for discussion.

Thanks, 
Marcel
Comment 1 Marcel Bruch CLA 2011-03-24 11:38:57 EDT
Created attachment 191835 [details]
Alternative view on how to configure content assist lists
Comment 2 Marcel Bruch CLA 2011-03-24 11:42:12 EDT
Created attachment 191838 [details]
Second, more compact configuration of content assist
Comment 3 Dani Megert CLA 2011-03-28 11:35:45 EDT
I guess technically it should be doable. Would you be interested in providing a prototype patch?
Comment 4 Marcel Bruch CLA 2011-03-28 12:01:03 EDT
Yes.
Is there a deadline until which the prototype should be ready to be considered for next (3.8)  release (I'm assuming that patches for 3.7 are not possible anymore, right?)

If 3.8 is targeted:
This topic seems perfect for an Eclipse hands-on. I'll see whether I can offer this topic to some students doing a hands-on this semester.

If 3.7 may be targeted:
I may come up with a prototype patch.
Comment 5 Dani Megert CLA 2011-03-29 04:12:51 EDT
(In reply to comment #4)
> Yes.
> Is there a deadline until which the prototype should be ready to be considered
> for next (3.8)  release
I think it would be good to have a first prototype patch available by M2 (mid September). Would that work?

> (I'm assuming that patches for 3.7 are not possible
> anymore, right?)
Correct.
Comment 6 Marcel Bruch CLA 2011-03-29 04:50:01 EDT
(In reply to comment #5)

> I think it would be good to have a first prototype patch available by M2 (mid
> September). Would that work?

Yes. I'll try to give this to a student as a hands-on this semester. If I don't find one until end of April I'll do it myself.

I'll come back to this issue with more details after the hands-on kickoff meeting end of April.
Comment 7 Marcel Bruch CLA 2011-04-23 04:44:47 EDT
Topic assignment for hands-on is done. We have two students working on this topic now. I'm confident that we will come up with a prototype before M2.
Comment 8 Dani Megert CLA 2011-04-26 03:16:57 EDT
Thanks for the updated Marcel.
Comment 9 Marcel Bruch CLA 2011-07-14 10:24:44 EDT
We have an early version that implements the flexible configuration behavior based on JDT 3.7.

What's the best way to get an early feedback on this student implementation? Is a URL to the git repository sufficient for testing?
Comment 10 Dani Megert CLA 2011-07-18 03:45:29 EDT
(In reply to comment #9)
> We have an early version that implements the flexible configuration behavior
> based on JDT 3.7.
> 
> What's the best way to get an early feedback on this student implementation? Is
> a URL to the git repository sufficient for testing?

Best would be a patch. We will move to Git this summer but currently we are completely booked with our work for Java 7 support.
Comment 11 Thomas Schlosser CLA 2011-07-18 09:57:46 EDT
Created attachment 199831 [details]
Patch for prototype of new content assist lists

The two icons "remove_proposal_list.gif" and "remove_proposal_list_over.gif" have to be added to "/icons/full/elcl16" to complete the patch.
Comment 12 Thomas Schlosser CLA 2011-07-18 09:59:52 EDT
Created attachment 199833 [details]
Icon needed to complete "org.eclipse.jdt.ui_3.7.1_patch"
Comment 13 Thomas Schlosser CLA 2011-07-18 10:00:40 EDT
Created attachment 199834 [details]
Icon needed to complete "org.eclipse.jdt.ui_3.7.1_patch"
Comment 14 Thomas Schlosser CLA 2011-07-18 10:01:11 EDT
Attached is a patch of the current version and two icons that have to be placed in "/icons/full/elcl16".
As this will not be the final version, you can get the most recent version from the following git repository:
http://vandyk.st.informatik.tu-darmstadt.de:8081/p/students/ep/thomas-content-assist-config

There are some incompatibilities with the old implementation.
- The internal model changed, so plugins which access this model directly do not work anymore. (e.g. "Java Proposals (Task-Focused)")
- The new configuration is stored as an inclusion-list (not as an exclusion-list as before), hence the behavior is slightly different. New proposal engines do not occur in any list by default. Each engine has to be configured explicitly.
Comment 15 Chris Aniszczyk CLA 2011-08-08 17:18:56 EDT
Any plans for 3.8?
Comment 16 Dani Megert CLA 2011-08-09 02:33:26 EDT
(In reply to comment #15)
> Any plans for 3.8?

We at least plan to look at the patch and then we can decide.
Comment 17 Thomas Schlosser CLA 2011-08-11 15:34:44 EDT
Created attachment 201347 [details]
New 3.8.0-Patch for prototype of new content assist lists

Attached is a new patch that fits the current CVS version and contains some bugfixes, new features and refactorings.
The project in the git repository has also been updated to the current "3.8.0"-version (Except for file "org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer", which contains compilation errors).
Comment 18 Thomas Schlosser CLA 2011-08-11 15:35:32 EDT
Comment on attachment 201347 [details]
New 3.8.0-Patch for prototype of new content assist lists

set "patch"-flag
Comment 19 Gerrit Hendrik Freise CLA 2011-09-06 14:03:31 EDT
Created attachment 202831 [details]
patch for an other prototype for the content assist list for Eclipse 3.8 from Freise

I am Gerrit, the other person who have worked on a solution for the new content assist list with dnd-functionality.

I authored 100% of the content I am contributing
(Except sources whose author is Johannes Lerch, as marked in
each license header of a class)
I have the rights to contribute the content
I'm contributing the content under the EPL
Comment 20 Dani Megert CLA 2012-02-07 09:03:29 EST
(In reply to comment #19)
> Created attachment 202831 [details] [diff]
> patch for an other prototype for the content assist list for Eclipse 3.8 from
> Freise

I loaded the patch and looked at the preference page for now (no code review, not tested whether it works when using Content Assist):

- A UI which only depends on DnD and/or context menu is not going to make it.
  On preference pages (dialogs in general) context menus are
  discouraged and also DnD should only be used when really needed and only as
  an alternative way to do things.

- I could not find a way to choose the proposal kinds for the default proposals
  as there are no check boxes anymore. There is also no context menu. It looks
  like I can do multi-selection but that is not stored (and it is not a good
  replacement for the check boxes).

- The page no longer describes what the groups are and when/how they are used.

- We don't use "#" as replacement for "number".

- We don't use flat look.

- (context) menu labels must be in title style.


Other things:

- When starting a workspace I get this logged:
!ENTRY org.eclipse.jdt.ui 4 10001 2012-02-07 14:47:12.767
!MESSAGE preference option missing: org.eclipse.jdt.ui/content_assist_category_order_extended (org.eclipse.jdt.internal.ui.preferences.CodeAssistAdvancedConfigurationBlock)

!ENTRY org.eclipse.jdt.ui 4 10001 2012-02-07 14:47:12.775
!MESSAGE preference option missing: org.eclipse.jdt.ui/content_assist_category_order_extended_non_default (org.eclipse.jdt.internal.ui.preferences.CodeAssistAdvancedConfigurationBlock)

- CodeAssistAdvancedConfigurationBlock: I guess you accidentally removed the
  following line:
 * Copyright (c) 2005, 2011 IBM Corporation and others.

- copyright:
  - Gerrit Hendrik Freise. ==> Gerrit Hendrik Freise and others.
  - adjust date
Comment 21 Dani Megert CLA 2012-02-07 09:17:43 EST
(In reply to comment #18)
> Comment on attachment 201347 [details] [diff]
> New 3.8.0-Patch for prototype of new content assist lists
> 
> set "patch"-flag

The relevant parts from comment 20 also apply to this patch.

Some additional comments:
- Please provide images in an archive with correct folder structure.
- Object images go into the 'obj16' folder, not 'ecl16'.
- JavaPluginImages is the place to define images. ImageHandler is not needed.
Comment 22 Dani Megert CLA 2012-02-07 09:38:18 EST
Something I forgot: both patches seem to be pretty big for what the intention is.
Comment 23 Dani Megert CLA 2012-02-08 02:40:40 EST
The main goal of this request is to choose from all existing proposal kinds in the invocations following the default/first. Hence I don't see the need to have separate UIs for default/first invocation) and subsequent ones. I think the simplest solution would be to have two lists. On the left we have the invocations and on the right we show the check box list of proposal kinds for the invocation currently selected on the left. We'd need some buttons which allow to add and remove (except default/first) invocations.


> Something I forgot: both patches seem to be pretty big for what the intention
> is.
There seems to be many helper / boiler plate types being added, but I might be wrong and they are all needed.
Comment 24 Marcel Bruch CLA 2012-02-17 02:17:41 EST
Looks like both students are gone, six months after their patch submission. Given the deadline in two weeks and your requested changes in UI and code, I'm not confident that I can submit a new patch in-time.
Comment 25 Dani Megert CLA 2012-02-17 03:03:18 EST
(In reply to comment #24)
> Looks like both students are gone, six months after their patch submission.
> Given the deadline in two weeks and your requested changes in UI and code, I'm
> not confident that I can submit a new patch in-time.

I agree. I suggest we plan and target for a concrete milestone so that I can put it on the plan and hence also reserve a time slot for it on my side.