Bug 259137 - [content assist] Improve completion proposals filtering and timeout
Summary: [content assist] Improve completion proposals filtering and timeout
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 11:54 EST by David Audel CLA
Modified: 2009-03-23 09:21 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2008-12-17 11:54:40 EST
build I20081211-1908

When i do code assist and then type some new characters, there is no new code assist request but the previously computed list of proposals is filtered

1) type 'new Arr'
2) do ctrl+space after S
a list of proposals is computed and displayed
3) type 'ayLi'
the list of proposal is filtered

During code assist when the timeout is reached only a subset of possible completions is proposed. Then if i do a code assist request which reach the timeout and then type some new characters, the missing proposals won't be proposed even if a new code assist request would not reach the timeout.

Currently i did not reach often the timeout but when i tested my patch for bug 6930 it happen more easily during code assist on constructors.

When the timeout is reached it could be better to do a new code assist request instead of filter the old proposals.

If it is not easy to do then the message in the status bar "Java code assist took too long: the proposal list might be incomplete." could be improved to suggest a way to obtain missing proposals.
Something like "Java code assist took too long: the proposal list might be incomplete. Close the list and type more characters to obtain the missing proposals".
Comment 1 Dani Megert CLA 2008-12-17 11:58:54 EST
>Currently i did not reach often the timeout 
In which cases did you? I've never hit it since we have it in place.
Comment 2 Philipe Mulet CLA 2008-12-17 12:20:12 EST
Jerome and I saw it recently. I believe this is a must fix going into 3.5, or we'd have to back out the timeout since this would be a regression (no completion at all).
Comment 3 Jerome Lanneluc CLA 2008-12-17 12:22:19 EST
I'm seeing this as well when my machine starts swapping. Today I saw at least 2 instances of empty list of proposals.
Comment 4 David Audel CLA 2008-12-17 12:33:21 EST
I saw it when completed types with one letter prefix in a big workspace.
Something like:
void foo() {
  A|
}

And two or three times when i wrote code in jdtcore. But i was unable to reproduce it.

So i saw it but it is very very rare.
Comment 5 Dani Megert CLA 2008-12-18 02:15:39 EST
>Jerome and I saw it recently. I believe this is a must fix going into 3.5, or
>we'd have to back out the timeout since this would be a regression (no
>completion at all).
I see. However, JDT Core should also investigate the cases where it takes so long to complete and try to improve there.

Fix is to either give a hint to type more characters or to avoid the timeout on second Ctrl+Space at identical location.
Comment 6 Dani Megert CLA 2009-03-23 09:21:39 EDT
I've improved the hint for 3.5. A better fix is hard (needs much more work) because currently the timeout is only known in JDT land but the content assist triggering and filtering is in lower layers.