Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 'Call hierarchy' for Lombok-generated methods #549

Open
rafaljaw opened this issue Nov 9, 2018 · 2 comments
Open

Support for 'Call hierarchy' for Lombok-generated methods #549

rafaljaw opened this issue Nov 9, 2018 · 2 comments

Comments

@rafaljaw
Copy link

rafaljaw commented Nov 9, 2018

Short description

It's often more useful to see the full call hierarchy (Ctrl + Alt + H) of given method (e.g. getter/setter/constructor) rather than showing usages (Alt + F7). I can do it only if I have the code for getter/setter/constructor available in the class. In case it is generated with Lombok I'm no longer able to see the call hierarchy.

Expected behavior

When calling 'Call hierarchy' (Ctrl + Alt + H) on field 'myField' I should get a popup with list of methods generated by Lombok (e.g. setMyField, getMyField, myField from builder) and after clicking on a given method I should get exactly what I would get if the method was in the source code and I called (Ctrl + Alt + H).

When calling 'Call hierarchy' (Ctrl + Alt + H) on a class name I should get a popup with list of all constructors generated by Lombok and after clicking on a given constructor I should get its call hierarchy.

Version information

  • IDEA Version: 2018.2
  • JDK Version: 1.8.0_152
  • OS Type & Version: Ubuntu 16
  • Lombok Plugin Version: 0.22.2018.2
  • Lombok Dependency Version: 1.16.20

Steps to reproduce

  1. Write any Class MyClass with any field myField and @getter annotation and 'getMyField' method in two different places in any other class/static method.

2.Try to find call hierarchy for getMyField method using Ctrl + Alt + H.

Sample project

Additional information

Stacktrace


STACKTRACE HERE (inside code markup)

@npiguet
Copy link

npiguet commented Nov 15, 2018

As a workaround to display the call hierarchy, you can:

  1. Open the structure panel for your Lombok-ized class
  2. Select the generated method/constructor that you are interested in within that structure panel
  3. Press Ctrl + Alt + H

That should give you the call hierarchy.

@hinneLinks
Copy link

Since IntelliJ IDEA 2019.3 CTRL + ALT + H works natively for fields, too (see https://youtrack.jetbrains.com/issue/IDEA-160274), but only shows getters/setters (and their usage) for directly written getters/setters, the Lombok Getters/Setters are ignored (and hence all other usages of them)
It would be great, if the call Hierachy clould also take account of the Lombok getteers/setters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants