Bug 51951 - codeComplete finds no completion in method of local class inside static method
Summary: codeComplete finds no completion in method of local class inside static method
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 07:16 EST by Markus Keller CLA
Modified: 2004-05-18 11:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-02-13 07:16:10 EST
200402122000

At the indicated position, ICompilationUnit#codeComplete(int offset,
ICompletionRequestor requestor) doesn't find a completion. Also no completion is
found when I replace the anonymous class by a local class. However, when I
remove the 'static' modifier from 'main', the method is found.

I noticed that the outline doesn't show the local class as soon as I start
typing in the body of run(), but this might not have a connection to this PR.

public class XXX {
	public static void main () {
		Runnable r = new Runnable() {
			public void run() {
				doT // <-- No completions available.
			}
			private void doTheThing() { }
		};
	}
}
Comment 1 David Audel CLA 2004-05-14 11:03:03 EDT
Fixed and test added
  CompletionTest#testCompletionInsideStaticMethod()
Comment 2 Olivier Thomann CLA 2004-05-18 11:30:54 EDT
Verified in 200405180816