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

Bug 541395

Summary: [code mining] implementations not shown on class
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: UIAssignee: Jeff Johnston <jjohnstn>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jjohnstn, Lars.Vogel, mistria, noopur_gupta, rgrunber, sarika.sinha
Version: 4.10Flags: Lars.Vogel: pmc_approved+
noopur_gupta: review+
Target Milestone: 4.10 RC2   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/132997
https://bugs.eclipse.org/bugs/show_bug.cgi?id=541832
https://bugs.eclipse.org/bugs/show_bug.cgi?id=541834
Whiteboard:
Bug Depends on: 529127    
Bug Blocks:    

Description Noopur Gupta CLA 2018-11-21 05:42:49 EST
I20181120-1800

package a;
public class A {
}

package a;
public class B extends A {
}

=> class A should show "1 implementation" as its annotation but it is not shown.
Comment 1 Noopur Gupta CLA 2018-11-21 05:43:33 EST
Angelo, it will be good to fix this for RC1.
Comment 2 Noopur Gupta CLA 2018-11-21 06:04:29 EST
Implementations are also missing on the methods.
Comment 3 Mickael Istria CLA 2018-11-23 02:53:28 EST
Resetting assignee to clarify someone else can work on this at the moment.
Comment 4 Eclipse Genie CLA 2018-11-23 11:32:48 EST
New Gerrit change created: https://git.eclipse.org/r/132997
Comment 5 Jeff Johnston CLA 2018-11-23 11:34:01 EST
(In reply to Noopur Gupta from comment #0)
> I20181120-1800
> 
> package a;
> public class A {
> }
> 
> package a;
> public class B extends A {
> }
> 
> => class A should show "1 implementation" as its annotation but it is not
> shown.

I have fixed the class issue with the above gerrit patch.  It also adds the find action to the implementation message so clicking shows type hierarchy.
Comment 6 Noopur Gupta CLA 2018-11-26 06:37:01 EST
(In reply to Jeff Johnston from comment #5)
> I have fixed the class issue with the above gerrit patch.  
Please add the fix for methods also in the patch.

> It also adds the
> find action to the implementation message so clicking shows type hierarchy.
With your patch, I see that Search view is opened to show the implementors. See bug 541390 where we want to open the Type Hierarchy view on clicking the "implementations" annotation. It will be good to attach this part of the fix to bug 541390 so that further discussion can happen on the dedicated bug.
Comment 7 Eclipse Genie CLA 2018-11-29 19:01:14 EST Comment hidden (obsolete)
Comment 8 Noopur Gupta CLA 2018-11-30 06:57:08 EST
Jeff, I have released the part of your patch to show "implementations" annotation on classes:
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=04983d9cfd4995e38ef96821aa98e4ec6e6c6307

For enabling the "implementations" annotation on methods and handling the clickable behavior, we will continue the discussion from your patch here. Copying your comment from Gerrit regarding this:

For method implementors, this patch opens the Search View corresponding to a search->declarations->hierarchy.

Dani, do you suggest going with the implementation in the patch for methods? 

Also, if we add the "implementations" annotation on methods, we can also add the preferences for this i.e.
- Show implementations for
    - Types
    - Methods
Probably something for 4.11.
Comment 9 Noopur Gupta CLA 2018-11-30 06:58:21 EST
(In reply to Noopur Gupta from comment #8)
> Jeff, I have released the part of your patch to show "implementations"
> annotation on classes:
> https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=04983d9cfd4995e38ef96821aa98e4ec6e6c6307
I have given +2 for this on the Gerrit patch.
Comment 10 Noopur Gupta CLA 2018-12-03 06:00:38 EST
(In reply to Noopur Gupta from comment #8)
> For enabling the "implementations" annotation on methods and handling the
> clickable behavior, we will continue the discussion from your patch here.
> Copying your comment from Gerrit regarding this:
> 
> For method implementors, this patch opens the Search View corresponding to a
> search->declarations->hierarchy.
> 
> Dani, do you suggest going with the implementation in the patch for methods? 
> 
> Also, if we add the "implementations" annotation on methods, we can also add
> the preferences for this i.e.
> - Show implementations for
>     - Types
>     - Methods
> Probably something for 4.11.

We had a discussion in the team and decided to move the methods story to 4.11 as it needs more thinking. I have opened bug 541834 for this. Jeff, please attach your existing patch to the new bug.

Also, we discussed and decided to modify the preferences text as per bug 541832.

This bug is about the missing implementations annotation on classes for which the fix has been released as mentioned in comment #9.
Comment 11 Noopur Gupta CLA 2018-12-06 05:27:55 EST
Verified as fixed in I20181204-0600.