Community
Participate
Working Groups
After updating the Eclipse IDE from 4.19 to 4.20, the content assist cycling in a java editor shows 'No Template Proposals' instead of the filled template proposals list it had before the update. The chain template proposals list is also empty, but I didn't recently use it in 4.19, so I can't tell if that is also an effect of the update.
Does it happen in every editor/code, or in a specific one? If in the specific one, please provide that. Also please attach error log.
I can reproduce this in the Eclipse Java IDE 2021-06 (4.20) and in the the latest build of the Eclipse SDK I20210705 with the following code: class Sample { void sample(String foo) { if (foo != null) { sys // content assist here System.out.println(); } } } It seems to be similar to bug 574338, since it can be reproduced with the same examples: - bug 574338 comment 0 - bug 574215 comment 14 - Stack Overflow question https://stackoverflow.com/q/68258236/6505250
Yep, no proposal for "sys" template after "if". Stephan, could you please take a look?
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182781
(In reply to Eclipse Genie from comment #4) > New Gerrit change created: > https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182781 A real template test will follow in JDT/UI once the core part is tested & released.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182781 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=fc32ee657551f11c9c828704e0fe8e261b3f4527
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782
(In reply to Eclipse Genie from comment #7) > New Gerrit change created: > https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782 Template test in JDT/UI (In reply to Eclipse Genie from comment #6) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182781 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=fc32ee657551f11c9c828704e0fe8e261b3f4527 Fix & core test released for 4.21 M1.
Wow, that was quick! Thanks Stephan! Great to have this in 4.21 M1.
(In reply to Holger Voormann from comment #9) > Wow, that was quick! Thanks Stephan! > > Great to have this in 4.21 M1. :) (and at first I had no idea how template proposals could be affected by the recent changes in regular completion - now I know).
(In reply to Stephan Herrmann from comment #8) > (In reply to Eclipse Genie from comment #7) > > New Gerrit change created: > > https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782 > > Template test in JDT/UI At first I noticed that TemplateCompletionTests is not contained in any test suite. After adding it to TemplatesTestSuite build logs told me: Jul 06, 2021 1:21:30 PM org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder buildRunner WARNING: Ignoring test class using JUnitPlatform runner: org.eclipse.jdt.text.tests.templates.TemplatesTestSuite Jul 06, 2021 1:21:30 PM org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder buildRunner WARNING: Ignoring test class using JUnitPlatform runner: org.eclipse.jdt.text.tests.templates.TemplatesTestSuite This led me to discover that the two test classes (which never ran on jenkins(?)) where configured for JUnit 5 whereas other tests incl. suite classes in the vicinity where at JUnit 4. In monkey-see-monkey-do style I configured TemplatesTestSuite and its two classes for JUnit4 ( https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782/2..3 ) @Carsten, please check if this is consistent with your JUnit refactoring, and please confirm that JUnit 4 is the version of choice in JDT/UI.
(In reply to Stephan Herrmann from comment #11) > (In reply to Stephan Herrmann from comment #8) > > (In reply to Eclipse Genie from comment #7) > > > New Gerrit change created: > > > https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782 > > > > Template test in JDT/UI > ... > This led me to discover that the two test classes (which never ran on > jenkins(?)) where configured for JUnit 5 whereas other tests incl. suite > classes in the vicinity where at JUnit 4. > > In monkey-see-monkey-do style I configured TemplatesTestSuite and its two > classes for JUnit4 ( > https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782/2..3 ) > > @Carsten, please check if this is consistent with your JUnit refactoring, > and please confirm that JUnit 4 is the version of choice in JDT/UI. Yes, Junit 4 is fine until we apply changes not exactly but similar to https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/177860/4/bundles/org.eclipse.test/src/org/eclipse/test/EclipseTestRunner.java to teach eclipse to be able to run integration build without suites (suites basically do not exist in Junit 5). I have not found the time to look deeper into it to find out how to test changes in this area. The gerrit build of course works if needed without suites and in general allows to run junit 5 based tests. But having suites and tests at the same time (removing suite references from the pom files) causes multiple execution of the tests. So you have to decide to remove suites to fix this. However, the integration build starts from ant using this limited EclipseTestRunner (without making use of ants junit5 support) and so we have to stay with juni4 at the time being. Your changes look fine to me. In case someone is interested see a sample to remove the suites in a single project at https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/168859
Just for completeness, suites have been introduced in https://github.com/junit-team/junit5/issues/744 but I'm not sure that it makes a difference for the EclipseTestRunner without further changes.
(In reply to Carsten Hammer from comment #12) > Your changes look fine to me. Thanks. Meanwhile patch set #4 improves test isolation: leaked option-changes in PostFixCompletionTest caused a failure in one of the tests that never ran on jenkins.
Verified for 4.21 M1 with build I20210707-1800
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=51d459d6418ecacaebcb9e36f6df787893727ba0
(In reply to Eclipse Genie from comment #16) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182782 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/ > ?id=51d459d6418ecacaebcb9e36f6df787893727ba0 integration test in JDT/UI released.