[ https://issues.apache.org/jira/browse/NETBEANS-6425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17483744#comment-17483744 ]
Petr Pisl commented on NETBEANS-6425: ------------------------------------- The implementation requires adding two interfaces to the LSP API. Clients can implement and register a {{StructureProvider}} into {{MimeLookup}} for a given mimetype. {{StructureProvider}} provides a list of top symbols to be displayed in the outline view. The symbol structure is composed of {{{}StrctureElements{}}}. StructureElements are then translated into {{{}DocumentSymbol{}}}s on the VSCode API side, which are displayed in the outline view and also in Go to a symbol (CTRL+SHIFT+O by default). {{DocumentSymbol}} has two methods {{getName()}} and {{{}getDetail(){}}}, which both return {{String}} and the resulting compound text is displayed in the outline view, where the text returned by {{getName()}} is slightly larger than the text returned by {{{}getDetail(){}}}. On the other hand, only the text returned by {{getName()}} is displayed in {*}Go to a symbol{*}. The {{DocumentSymbol}} documentation says that {{getName()}} should return the name of the symbol and {{getDetail()}} should return the detail of the symbol, such as the signature of the function. Currently in outline view we display the signature as the symbol name and the type as the symbol detail for java files. This means that in Go to a symbol we display not only the names but the symbol, but also signatures with the types of the function parameters, which can affect the symbol search. See the picture: !Screenshot from 2022-01-28 11-05-32.png! On the other hand, the java extension offered by Microsoft does the same. However, in my opinion, {{getName}} should really return only the name of the symbols and this would make the search in Go to symbol easier. This PR also moves the existing functionality that provided outline view for java files outside the LSP server. The JavaStructureProvider implementation is now in the java.editor module, which already has a dependency on the LSP API. Provider should logically belong to java.navigation module, but this module is not enabled for VsCode extension and if we enable it, it brings with it dependency on WindowsSystem.API, which is not sufficient now. > Provide outline view for Groovy file in VSCode > ---------------------------------------------- > > Key: NETBEANS-6425 > URL: https://issues.apache.org/jira/browse/NETBEANS-6425 > Project: NetBeans > Issue Type: New Feature > Reporter: Petr Pisl > Priority: Major > Labels: pull-request-available > Attachments: Screenshot from 2022-01-28 11-05-32.png > > Time Spent: 20m > Remaining Estimate: 0h > > Currently we don't provide outline view in VS Code extension. Would be useful > to have this feature there. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists