Bug 39499 - keyword completion does not work in anonymous inner classes
Summary: keyword completion does not work in anonymous inner classes
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: 2003-07-01 05:44 EDT by Kai-Uwe Maetzel CLA
Modified: 2004-05-18 11:03 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 Kai-Uwe Maetzel CLA 2003-07-01 05:44:59 EDT
Build I20030625:
Do not get completion proposals at indicated cursor position:

	public void createPartControl(Composite parent) {
		super.createPartControl(parent);
		getEditorSite().getSelectionProvider
().addSelectionChangedListener(new ISelectionChangedListener() {
			public void selectionChanged(SelectionChangedEvent 
event) {
				ISelection selection= event.getSelection();
				if (selection inst>I< )
			}
		});
	}
Comment 1 David Audel CLA 2004-01-22 12:07:46 EST
Problem still occurs in build 20040120

simple test case
public class X {
	public void foo() {
		bar(new Object() {
			public void toto(Object a) {
				if (a instanceof Object) {}
			}
		});
	}

	private void bar(Object o) {

	}
}

The problem does not occur with the following test case
public class X {
	public void foo() {
		new Object() {
			public void toto(Object a) {
				if (a instanceof Object) {}
			}
		};
	}

	private void bar(Object o) {

	}
}
Comment 2 David Audel CLA 2004-05-17 12:46:20 EDT
The problem was a bad usage indexOfAssistIdentifier() inside CompletionParser.

Fixed and test added
  CompletionParserTest2#test0142()
Comment 3 Olivier Thomann CLA 2004-05-18 11:03:18 EDT
Verified in 200405180816