dbalek commented on code in PR #5938:
URL: https://github.com/apache/netbeans/pull/5938#discussion_r1192272977


##########
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java:
##########
@@ -397,6 +398,47 @@ public CompletableFuture<Object> 
executeCommand(ExecuteCommandParams params) {
                     return future;
                 });
             }
+            case Server.JAVA_RESOLVE_STACKTRACE_LOCATION: {
+                CompletableFuture<Object> future = new CompletableFuture<>();
+                try {
+                    String uri = ((JsonPrimitive) 
params.getArguments().get(0)).getAsString();
+                    String methodName = ((JsonPrimitive) 
params.getArguments().get(1)).getAsString();
+                    String fileName = ((JsonPrimitive) 
params.getArguments().get(2)).getAsString();
+
+                    FileObject fo = Utils.fromUri(uri);
+                    ClassPath classPath = 
ClassPathSupport.createProxyClassPath(new ClassPath[] {
+                        ClassPath.getClassPath(fo, ClassPath.EXECUTE),
+                        ClassPath.getClassPath(fo, ClassPath.BOOT)
+                    });
+
+                    String name = fileName.substring(0, 
fileName.lastIndexOf('.'));

Review Comment:
   Yes, it works for `.groovy` files too.



-- 
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

Reply via email to