You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
I would like to request a CodeLens-style feature in the NetBeans Java Editor that displays reference counts above methods and classes, similar to Visual Studio. This feature would integrate with the existing Find Usages functionality in NetBeans, allowing users to see and navigate to method/class references efficiently.
Feature Description
This feature would analyze Java source code using the Java Source API and dynamically update a reference count for each method and class. The reference count would be displayed inline above the method/class definition in the editor. Clicking on the reference count should open the existing Find Usages UI, listing all references and allowing users to navigate to each occurrence.
Key Features & Functionality
Display Reference Count Above Methods and Classes
Show how many times a method or class is referenced in the project.
Update dynamically when the file or project is modified.
Integration with Existing "Find Usages" Feature
Clicking on the reference count should trigger Find Usages.
Display results using the existing "Find Usages" UI, ensuring consistency with NetBeans’ workflow.
Non-intrusive UI Design
Display the reference count inline above the method/class, not in the gutter.
Allow enabling/disabling the feature via settings.
Efficient and Performant
Perform the analysis in the background using NetBeans Java Source API.
Optimize for large projects by leveraging Find Usages indexing instead of scanning files manually.
Why This Feature is Important?
Boosts productivity by eliminating the need to manually run "Find Usages" for frequently used methods.
Improves code readability by instantly showing usage counts.
Enhances navigation by providing quick access to usages through a familiar UI.
Implementation Approach
Use Java Source API to analyze method and class references.
Display reference count annotations above methods/classes in the editor.
On clicking the reference count, invoke the existing Find Usages UI to display results.
Additional Notes
This feature would modernize the NetBeans Java Editor by providing a lightweight but powerful way to navigate code references. Since NetBeans already has a strong Find Usages implementation, this proposal focuses on seamless integration rather than reinventing functionality.
Would love to hear thoughts from the NetBeans team and community!
Thanks for considering this feature request.
Use case/motivation
No response
Related issues
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered:
It should be possible by adding this with the virtual text that @jlahoda introduce a while ago. I also wanted to have a look and this is defintely a nice and handy feature, not only for the java editor.
Description
Summary
I would like to request a CodeLens-style feature in the NetBeans Java Editor that displays reference counts above methods and classes, similar to Visual Studio. This feature would integrate with the existing Find Usages functionality in NetBeans, allowing users to see and navigate to method/class references efficiently.
Feature Description
This feature would analyze Java source code using the Java Source API and dynamically update a reference count for each method and class. The reference count would be displayed inline above the method/class definition in the editor. Clicking on the reference count should open the existing Find Usages UI, listing all references and allowing users to navigate to each occurrence.
Key Features & Functionality
Display Reference Count Above Methods and Classes
Integration with Existing "Find Usages" Feature
Non-intrusive UI Design
Efficient and Performant
Why This Feature is Important?
Implementation Approach
Additional Notes
This feature would modernize the NetBeans Java Editor by providing a lightweight but powerful way to navigate code references. Since NetBeans already has a strong Find Usages implementation, this proposal focuses on seamless integration rather than reinventing functionality.
Would love to hear thoughts from the NetBeans team and community!
Thanks for considering this feature request.
Use case/motivation
No response
Related issues
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: