vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

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

Open tommai78101 opened this issue 5 years ago • 4 comments

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

tommai78101 avatar Jul 23 '20 13:07 tommai78101

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.

akaroml avatar Jul 29 '20 09:07 akaroml

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:

https://github.com/microsoft/vscode/issues/97095

tommai78101 avatar Jul 29 '20 14:07 tommai78101

Also support static indicator icon.

sandipchitale avatar May 04 '21 02:05 sandipchitale

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

mitonize avatar Oct 09 '22 02:10 mitonize