Bug 576207 - [Content assist] Code completion proposals don't always work.
Summary: [Content assist] Code completion proposals don't always work.
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.21   Edit
Hardware: PC All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks: 575919
  Show dependency tree
 
Reported: 2021-09-23 01:33 EDT by Marvin Fröhlich CLA
Modified: 2023-12-18 19:01 EST (History)
3 users (show)

See Also:


Attachments
Visual (1.31 MB, video/mp4)
2021-11-06 12:49 EDT, Wim Jongman CLA
no flags Details
Fails consistently after "case: 1" (805 bytes, application/octet-stream)
2021-11-06 12:52 EDT, Wim Jongman CLA
no flags Details
content assist not working in front of array-assignments within a code-block (633 bytes, application/octet-stream)
2021-12-14 12:03 EST, Nicolai Fabisch CLA
no flags Details
content assist not working in front of code within a code-block (1.21 KB, text/plain)
2021-12-27 09:00 EST, Nicolai Fabisch CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2021-09-23 01:33:13 EDT
Content assist proposals sometimes quit their job. You'll get no useful proposals then. An Eclipse restart will help. But it's definitely a pain in the ass.

It started with 2021-06, where we had to reset proposal selections and orders to get anything at all. But still this bug exists.

Unfortunately there's no parcours to walk to reproduce this behavior. But everyone here in the company encounters it.

I already tried with a plain "for Java developers" release and a virgin workspace. It works there. Then I stripped all the useless plugins and installed our selection step by step. And every time it kept working. So it doesn't seem to have to do with our plugin selection. But again, you have to use the IDE for some time to walk across this bug.

I suppose, this must be somethinig, that every developer experiences in 2021-06 and -09.

It seems to make a difference, where the caret is when hitting CTRL+SPACE.

foo.getBar|( |"", |1, 2 );

But it can also happen, that none of them works.

Can I do anything else to help find this bug. It really is half a show stopper.
Comment 1 Andrey Loskutov CLA 2021-09-23 02:37:29 EDT
Please check linked bugs on umbrella bug 575919 (for 4.21) and bug 574913 (4.20).

This bug is too generic to be useful, so please reduce it to a case that is not yet covered by existing bugs above and provide a small example to reproduce.
Comment 2 Marvin Fröhlich CLA 2021-10-08 07:47:28 EDT
Today I read an article about this bug.

https://www.heise.de/news/Entwicklungsumgebung-Eclipse-2021-09-hat-Java-17-im-Beiboot-6193023.html

Looks like there are officially known problems with code completion in 2021-06, which were supposed to be fixed in 2021-09. Well, obviously they're not fixed. And it looks like other users experience this, too, which doesn't surprise me, because everyone in our company experiences it. We just cannot provide a test case, because it happens in parts of our code, that I cannot share.

Is there anyting, I can do to speed this up, because this really is kind of a road stopper. Do you need some certain information? Should I check something special?

Is there anybody else to report things like this?
Comment 3 Andrey Loskutov CLA 2021-10-08 07:51:29 EDT
Please see comment 1.
Ideally you can extract a small Java snippet that represents the issue. If you have it, check if anything similar is already reported (see linked bugs on umbrella bug 575919 for 4.21) and if you think it is a new issue, please report a new bug.

Just complaining without concrete examples will not help.
Comment 4 Marvin Fröhlich CLA 2021-10-08 08:10:01 EDT
Well, as I said, extracting an example is impossible at the moment. But I don't want to to go under.

Luckily it looks like there's a lot going on in that umbrella ticket and satellites. So it should be safe to wait for things to be sorted.
Comment 5 Wim Jongman CLA 2021-11-06 12:47:23 EDT
I can confirm that code completion often breaks. I think it happens inside switch blocks and lambda functions. Please see the attached movie for a visual of what is happening.

The failing source is also attached.


Eclipse IDE for Eclipse Committers (includes Incubating components)
Version: 2021-09 (4.21.0)
Build id: 20210910-1417
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 17+35
Java version: 17
Comment 6 Wim Jongman CLA 2021-11-06 12:49:49 EDT
Created attachment 287461 [details]
Visual
Comment 7 Wim Jongman CLA 2021-11-06 12:52:49 EDT
Created attachment 287462 [details]
Fails consistently after "case: 1"
Comment 8 Nicolai Fabisch CLA 2021-12-14 12:03:23 EST
Created attachment 287676 [details]
content assist not working in front of array-assignments within a code-block

Here is a simple example for reproduction

The content assist does not work in front of array-assignments that are inside of any type of code-block (while/for/if/case...) as far as I can tell.
Comment 9 Nicolai Fabisch CLA 2021-12-27 09:00:36 EST
Created attachment 287739 [details]
content assist not working in front of code within a code-block

Here is another example where content assist no longer works.

Happens regularely if i want to replace System.out.println with a logging framework or similar changes only to the method-call and not the parameters of the call.

Version: 2021-12 (4.22.0)
Build id: 20211202-1639
Comment 10 Eclipse Genie CLA 2023-12-18 19:01:05 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.