Community
Participate
Working Groups
I added the following inner class to JavaEditor.java: private class EditorSelectionChangedListener extends AbstractSelectionChangedListener { public void selectionChanged(SelectionChangedEvent event) { selectionChanged(); } } and protected void selectionChanged() {...} to the class JavaEditor This gives a compiler error: The method selectionChanged(SelectionChangedEvent) in the type JavaEditor.EditorSelectionChangedListener is not applicable for the arguments () Adding JavaEditor.this. in front of selectionChanged() solves it. Also, pressing F3 on selectionChanged() jumps to selectionChanged(SelectionChangedEvent event)
Created attachment 8880 [details] JavaEditor.java
Reproduced on simplified test case: class X { private class EditorSelectionChangedListener { public void selectionChanged(Object event) { selectionChanged(); } } protected void selectionChanged() {} } The compiler error is legite. Method lookups discriminate on arguments amongst several matches per selector if these occur on the same method. This is why the method #selectionChanged(Object) is picked up, then complained against. This is what the language spec requires. You should rename the outer method to avoid collision. Closing as invalid.