Community
Participate
Working Groups
Related to bug #574215 Version: 2021-09 (4.21) Build id: I20210617-1800 public class Snippet { private boolean flag; private void test(List<String> c) { if (flag) { | // content assist here List<String> scs = c.subList(0, 1); } } String test() { return null; } } Content assist only offers the type Snippet, not test() or c.
As in bug #574215, if you add a semicolon after the cursor, content assist works
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182297
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182297 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=fc694e0fbf4427a775fcd07667dc65453b280c4d
Released for 4.21 M1, thanks.
Verified with Eclipse. Version: 2021-09 (4.21) Build id: I20210706-1800
*** Bug 574716 has been marked as a duplicate of this bug. ***
*** Bug 575811 has been marked as a duplicate of this bug. ***
*** Bug 575746 has been marked as a duplicate of this bug. ***
THIS IS NOT FIXED!! bug still persists in 4.21! specifically it stops to work in 2 level nested for-loops.
Created attachment 287296 [details] screenshot showing the bg it doesn't even need to be nested for, it turns: see the screenshot.
this situation also shows how out of touch with reality eclipse release policy is: instead of releasing the supposed fix as an update to 2021-06 and get users feedback if it really works, the eclipse team decided to wait with releasing the fix until 2021-09 release. Now 2021-09 is also broken: congratulations... I hope someone will learn a lesson from this and we will not have to wait for the fix until 2021-12...
@Piotr I'm using 4.21 on Windows, Mac and Linux and can't reproduce the issue. Perhaps you could post exact steps to reproduce and details on your setup?
(In reply to Piotr Morgwai Kotarbinski from comment #10) > Created attachment 287296 [details] > screenshot showing the bg > > it doesn't even need to be nested for, it turns: see the screenshot. I tried your exact example in a pristine Eclipse 2021-09 (4.21), and could not detect any problem. Completion is proposed as expected. At this point I suggest to cool down, while together we search for a reason why things on your machine look different. For a start please check the Preferences at Java > Editor > Content Assist > Advanced. Is the option "Java Proposals" checked in the upper box?
@Stepah, sure happy to help :) My exact environment: build id 20210910-1417) Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components) Version: 2021-09 (4.21.0) Build id: 20210910-1417 OS: Linux, v.5.4.0-87-generic, x86_64 / gtk 3.22.30, WebKit 2.32.4 Java vendor: Oracle Corporation Java runtime version: 16.0.2+7-67 Java version: 16.0.2 It's a quite fresh profile created in June after I had to downgrade from 2021-06 to 2021-03 (due to this bug exactly). As far as I remember the only changes to default installation settings was installing protobuf-plugin, adding openJdk-11, importing my code-style and customizing perspective. Yesterday, after upgrading from 2021-03 to 09 I also installed some official CDT tools. I've just verified `Java > Editor > Content Assist > Advanced > "Java Proposals` and it was unchecked. I've checked it, clicked `close and apply` but no effect. The full code as it is partially convered in the screenshot: ``` package pl.morgwai.samples; public class Sample { public static void main(String[] args) { for (int i = 0; i < 32; i++) { System.out. System.out.println(); } } } ``` placing cursor after `System.out.` and pressing `ctr`+`space` gives empty list of proposals. I've just verified 1 more time that It was working perfectly fine in 2021-03 (I've made a backup of my settings before the upgrade to 2021-09, learnt by my June experience) Please let me know if you need any more details.
(In reply to Piotr Morgwai Kotarbinski from comment #14) That's a different issue: see bug 575631.
1 more detail: the way I upgraded from 2021-03 to 2021-09 was to replace the whole `eclipse` folder by the one from `eclipse-jee-2021-09-R-linux-gtk-x86_64.tar.gz` file.
(In reply to Holger Voormann from comment #15) > (In reply to Piotr Morgwai Kotarbinski from comment #14) > That's a different issue: see bug 575631. While there may be indeed 2 different bugs in the eclipse code, it looks pretty much the same from user perspective: you write a loop and inside the loop code-completion does not work.
...and I came here following the link you added in an SO thread named "Eclipse content assist fails in loops after upgrade to 2021-06 (4.20.0)" ;-)
I get same problem I use : - Windows 10 Pro (French edition) 64bit - Version: 2021-09 (4.21.0) Build id: 20210910-1417 (Java 16.0.2+7-67) - zip download from Eclipse : eclipse-jee-2021-09-R-win32-x86_64.zip Plugins : - [x] MailSnag test email ... - [x] EasyShell 2.1.0 (20/20) - [x] Autodetect Encoding - [x] Run Jetty Run 1.3.5 - [x] Asciidoctor Editor 2.0.3
If there are an ";" : after "System.out." " the completion is working ! see code : public class Sniper { public static void main(String[] args) { for (int i = 0; i < 32; i++) { System.out.; System.out.print(false); } } } I suppose that completion look after the current pointer, and current line.
This is going to be a tough one: we have plenty of confirmation that this bug and some duplicates have effectively been fixed. Also comment 12 and comment 13 show it's not a matter of the code example, as we have tested the exact same code - and it worked. Ergo, the next likely causes would be: 1. different preference configuration 2. broken workspace / project state 3. installation did not effectively install the fix Ad 1.: please attach screen shot of the preference page mentioned in comment 13. Ad 2.: can it be reproduced in a fresh new workspace? Ad 3.: easiest way to check: please attach the content of Help > About Eclipse ... > Installation Details > Configuration (we only need the list of plugins with exact versions, actually) If in the end we find a way to reproduce a problem, we will most likely create a new bugzilla entry.
(In reply to Stephan Herrmann from comment #21) (...) > > If in the end we find a way to reproduce a problem, we will most likely > create a new bugzilla entry. As pointed in #c15 an entry already exists: I guess all further discussion should be moved there, no?
(In reply to Bruno Lacombe from comment #20) > ... > see code : ... According to your code, you are talking about bug 575631, which is similar, but not the same, and not yet fixed. I can confirm (and you should also be able to verify) that this bug has been fixed with the example code given by the bug description. Sorry for the noise caused by my Stack Overflow answer (https://stackoverflow.com/a/68265945/6505250) referring to this bug. I added a note to avoid further noise.
I apologize that my testing in comment 13 didn't succeed to produce the bug. As a weak excuse I could say that reproducing a bug from a screenshot is less likely than doing so from a full code example :) Anyway, for posterity let's repeat that this bug (see comment 0) is verified fixed in 4.21, whereas bug 575631 is still waiting for a fix.
I confirm completion not propose "print..." in this code (below) In fact it propose nothinn I try on Eclipse 2021 (not plugin) from (https://rhlx01.hs-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4/S-4.22M1-202109291800/eclipse-SDK-4.22M1-win32-x86_64.zip ) : Version: 2021-12 (4.22) Build id: I20210929-1800 and on (my production env) : Version: 2021-09 (4.21.0) Build id: 20210910-1417 ---- public class MyTest { public static void main(String[] args) { for (int i = 0; i < 32; i++) { System.out.p //Completion not work here after the point System.out.println("hello"); } } String test() { return null; } } ----
(In reply to Bruno Lacombe from comment #25) > I confirm completion not propose "print..." in this code (below) That's bug 575631. Please move the discussion to that bug (I'm on it).