Bug 574882 - [content assist] No content assist for templates on last line in lambda block
Summary: [content assist] No content assist for templates on last line in lambda block
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.20   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.21 M3   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 574913
  Show dependency tree
 
Reported: 2021-07-16 04:11 EDT by Andrey Loskutov CLA
Modified: 2021-08-05 08:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2021-07-16 04:11:25 EDT
Regression in 4.20, also still on master / I20210714-1800:

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;

public class ForLoop {
	public static void main(String[] args) {
		AtomicInteger executions = new AtomicInteger();
		ExecutorService pool = Executors.newFixedThreadPool(1);
		for (int i = 0; i < 42; i++) {
			pool.execute(() -> {
				// sys| offers sysout etc templates here 
				executions.incrementAndGet();
				// sys | content assist doesn't offer "sysout" etc templates here
			});
		}
	}
}
Comment 1 Andrey Loskutov CLA 2021-07-24 06:04:33 EDT
Still in I20210723-1800
Comment 2 Eclipse Genie CLA 2021-07-31 15:43:16 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183573
Comment 3 Stephan Herrmann CLA 2021-07-31 15:47:09 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created:
> https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183573

Fine tuning of the fix for bug 574803: we need the right assistNodeParent in order to get a TL_STATEMENT_START context, which in turn triggers the sys* template proposals.
Comment 5 Stephan Herrmann CLA 2021-07-31 17:32:24 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183573 was
> merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=17232d45e7813c57f73ef1df28a519815a01a17a

Released for 4.21 M3
Comment 6 Stephan Herrmann CLA 2021-08-04 12:16:39 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created:
> https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183573

This entry on gerrit got lost during the recent outage and rollback to a time before. The commit seems to be in master, though.
Comment 7 Andrey Loskutov CLA 2021-08-05 08:36:52 EDT
Verified in I20210804-1800