Bug 544929

Summary: [navigation] resolve "implementation" for final fields set at declaration that override a method
Product: [Eclipse Project] JDT Reporter: Mickael Istria <mistria>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 4.10Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=544888
Whiteboard:

Description Mickael Istria CLA 2019-02-28 16:28:51 EST
This is another form of expressing bug 544888.
Initial story
```
I have org.eclipse.jface.text.contentassist.CompletionProposalOpen in Java editor.
I'm looking at a line of code that shows `fFilterRunnable.run();` and try a Ctrl+Click on the `run` method > Open Implementation.
As the field is final and private, I'd expect the (anonymous) type would be resolved and it would jump to the run(...) method implementation of this object.
Instead, the UI seems to compute a type hierarchy and shows it a popup, that doesn't even seem to include the anonymous type.
```

More generic, assume the following code
```
public class Foo {
  final Runnable r = new Runnable() {
     @Override public void run() { ... }
  };

  void method() {
     r.run();
  }
```

In this case, it would be great to have a Ctrl+Click > Open Implementation on `run()` dereference resolving to the method definintion a few lines above, given that
1. r is a final field
2. r is initialized during field declaration.