Bug 576976 - [content assist][override method] Wrong override method proposals inside lamda
Summary: [content assist][override method] Wrong override method proposals inside lamda
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 575919
  Show dependency tree
 
Reported: 2021-10-31 04:24 EDT by Christoph Laeubrich CLA
Modified: 2023-11-23 12:13 EST (History)
2 users (show)

See Also:


Attachments
Screenshot of proposals (173.28 KB, image/png)
2021-10-31 04:24 EDT, Christoph Laeubrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.