Skip to content

Visual Studio Code Outline should indicate public, protected, private, and package-private methods when viewing a Java document. #1544

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

Open
tommai78101 opened this issue Jul 23, 2020 · 4 comments

Comments

@tommai78101
Copy link

This is a feature request.

I don't know if this requires upstream support from Visual Studio Code itself. Currently, when viewing the Outline in Visual Studio Code, there are no indications suggesting the methods is public, protected, private, or package-private. In other words, it is difficult to differentiate the method accessors by type just by viewing the Outline. You can see the Visual Studio Code screenshot below, and try to find which one of them is not private:

image

In Eclipse, they have different icon colors to indicate the different method accessors.

image

It would be nice to see them, so it's easier to find and discover which methods are available from the Outline.

Environment
  • Operating System: Ubuntu 18.04.4 LTS
  • JDK version: OpenJavaSDK 1.8 (on maintenance mode at work)
  • Visual Studio Code version: 1.47.2
  • Java extension version: 0.64.1
Current Result

Not easy to differentiate the method's accessor levels (public, protected, private, package-private) in the Outline.

image

Expected Result

Something along the lines of being able to differentiate the methods in the Outline.

image

@akaroml
Copy link
Contributor

akaroml commented Jul 29, 2020

The Outline view visualizes Document Symbols, which do not have accessor info today. For this to happen, vscode needs to change its protocols.

Instead, you could use the JAVA DEPENDENCIES view provided by Java Dependency Viewer extension.

@tommai78101
Copy link
Author

tommai78101 commented Jul 29, 2020

Ok, so it really is an issue that requires upstream support. I'll post there and ask for document symbols protocols support, otherwise it really would be nice to have this. Do you know of any prior issues on Visual Studio Code that is related to this, so I can make sure not to report any duplicates?

This is the only issue thus far I found to be somewhat relevant:

microsoft/vscode#97095

@sandipchitale
Copy link

Also support static indicator icon.

@mitonize
Copy link

mitonize commented Oct 9, 2022

These issues are also relevant.
microsoft/language-server-protocol#98
microsoft/vscode#23927

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

6 participants