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

Bug 576135

Summary: CTRL context menu is missing in parameterized abstract class implementation
Product: [Eclipse Project] JDT Reporter: Niklas Jacobsen <ashnurazg+eclipse>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: loskutov, snjezana.peco
Version: 4.21   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576121
Whiteboard:

Description Niklas Jacobsen CLA 2021-09-21 03:18:06 EDT
The context menu (e.g. with menu items "Open Declaration", "Open Declared Type") is missing when hovering with the mouse over a variable or enum value that is accessed inside a parameterized abstract class implementation and pressing the CTRL key at the same time. 

The click on these variables/enum values when pressing the CTRL key at the same time to open the declaration doesn't work either.

It doesn't matter where the variable is defined, this issue is reproducible when it's a constant in another class or an enum value.

I especially stumbled across this issue when using OpenJFX's Task.

The issue can be reproduced with this SSCCE:

import javafx.concurrent.Task;

public class Test{

   public static void main(String[] args){

      String yourName = "Niklas";
      Task<Integer> task = new Task<>(){

         Integer hashCode = yourName.hashCode(); // context menu for variable "yourName" is missing here

         @Override
         protected Integer call() throws Exception{

            this.hashCode = 0; // context menu for variable "hashCode" is missing here

            Integer anotherVariable = 0;
            anotherVariable.intValue(); // context menu for variable "anotherVariable" is missing here

            return yourName.length(); // context menu for variable "yourName" is missing here
         }
      };
   }
}
Comment 1 Andrey Loskutov CLA 2021-09-21 07:52:31 EDT
Probably duplicate of bug 576121.
Comment 2 Snjezana Peco CLA 2021-09-21 11:39:50 EDT
(In reply to Andrey Loskutov from comment #1)
> Probably duplicate of bug 576121.

https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/185626 fixes this issue too.
Comment 3 Andrey Loskutov CLA 2021-09-22 03:42:55 EDT

*** This bug has been marked as a duplicate of bug 576121 ***