Bug 576976

Summary: [content assist][override method] Wrong override method proposals inside lamda
Product: [Eclipse Project] JDT Reporter: Christoph Laeubrich <laeubi>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: kalyan_prasad, loskutov
Version: 4.22   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=574968
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574913
https://bugs.eclipse.org/bugs/show_bug.cgi?id=575919
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 575919    
Attachments:
Description Flags
Screenshot of proposals none

Description Christoph Laeubrich CLA 2021-10-31 04:24:42 EDT
Created attachment 287410 [details]
Screenshot of proposals

Bug 574968 might be related.

Given the following snippet:
---------------------------------------------
package code_assist_bugs;

import java.util.concurrent.ForkJoinPool;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.Action;

public class WrongOverrideMethodProposals extends Action {

	@Override
	public void run() {

		ForkJoinPool.commonPool().execute(() -> {
			doWork(new NullProgressMonitor() {
                   ------> Trigger content assist here <-----
			});
		});
	}

	private static void doWork(IProgressMonitor monitor) {

	}
}
---------------------------------------------

I get suggested to override methods that are part of Action (what does not make any sense here) but not for NullProgressMonitor (what is desired).
Comment 1 Eclipse Genie CLA 2023-11-23 12:13:29 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.