Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333948

Summary: Open from Clipboard incorrectly returns methods from inner classes
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Deepak Azad CLA 2011-01-11 03:37:42 EST
- Use the following snippet
----------------------------------------------------------
package p;
class A {
	void foo() {
		Runnable runnable = new Runnable() {
			public void run() {
				
			}
		};
	}
	
	void run() {
		
	}
}
----------------------------------------------------------

- Open from Clipboard 'p.A.run()'
=> dialog opens with both the run methods

OpenFromClipboardAction.doMemberSearch(...) should probably use  SearchEngine.createHierarchyScope(IType) instead of SearchEngine.createJavaSearchScope(IJavaElement[])
Comment 1 Deepak Azad CLA 2011-01-11 04:59:11 EST
(In reply to comment #0)
> OpenFromClipboardAction.doMemberSearch(...) should probably use 
> SearchEngine.createHierarchyScope(IType) instead of
> SearchEngine.createJavaSearchScope(IJavaElement[])
If this is done 'p.A$1.run()' will probably not work.
Comment 2 Deepak Azad CLA 2011-01-17 07:33:18 EST
(In reply to comment #1)
> If this is done 'p.A$1.run()' will probably not work.
Never mind, it does not work.
Comment 3 Eclipse Genie CLA 2019-12-23 16:23:45 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.