sdedic commented on code in PR #6331:
URL: https://github.com/apache/netbeans/pull/6331#discussion_r1293001172
##########
java/java.editor/src/org/netbeans/modules/editor/java/JavaStructureProvider.java:
##########
@@ -45,7 +45,7 @@
*
* @author Petr Pisl
*/
-@MimeRegistration(mimeType = "text/x-java", service = StructureProvider.class)
+@MimeRegistration(mimeType = "text/x-java", service = StructureProvider.class,
position = 10)
Review Comment:
I'd leave more "ordering space" before java structure provider for the
providers of 'more important' symbols.
##########
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java:
##########
@@ -686,6 +693,38 @@ public CompletableFuture<Object>
executeCommand(ExecuteCommandParams params) {
}
return CompletableFuture.completedFuture(true);
}
+ case Server.NBLS_DOCUMENT_SYMBOLS: {
+ List<DocumentSymbol> result = new ArrayList<>();
+ try {
+ List<Object> arguments = params.getArguments();
+ String source = ((JsonPrimitive)
arguments.get(0)).getAsString();
+ String query = arguments.size() > 1 ?
((JsonPrimitive)arguments.get(1)).getAsString() : "";
+ FileObject file = Utils.fromUri(source);
+ Document rawDoc =
server.getOpenedDocuments().getDocument(source);
Review Comment:
Should the query work just for opened (didOpen received) documents ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists