Discovering main class does not work with arguments
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginnen Sie bei JDTDelegateCommandHandler.java:94 und verfolgen Sie den vscode.java.resolveMainClass-Pfad bis zu ResolveMainClassHandler. Reproduzieren Sie die workspace/executeCommand-Anforderung mit dem URI der einzelnen Datei. Überprüfen Sie anschließend, dass das Argument ohne den String-to-ArrayList cast failure verarbeitet wird und dass die Ergebnisse der Main-Klasse auf das relevante Projekt eingegrenzt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi i am attempting to call the vscode.java.resolveMainClass with a single argument (the arguments param being array with one entry, the uri) being the uri to a file which is part of a project to which jdtls has been attached to with the java-debug extension enabled. If i try to do that, i get empty response, no errors seemingly. If i pass no uri, just call the command to resolve the main classes it returns fine, the issue here is that i have single jdtls instance which has multiple workspaces / projects attached to it, and so i would like to use the argument to narrow down the result to only the current workspace / context by passing the uri. According to the implementation, it is supposed to handle file uris passed as the first and only argument to this method to use it to resolve the result in ResolveMainClassHandler
[ERROR][2023-05-22 16:04:05] ...lsp/handlers.lua:535 "May 22, 2023, 4:04:05 PM Error in calling delegate command handler\nclass java.lang.String cannot be cast to class java.util.ArrayList (java.lang.String and java.util.ArrayList are in module java.base of loader 'bootstrap')\njava.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.ArrayList (java.lang.String and java.util.ArrayList are in module java.base of loader 'bootstrap')\n\tat org.eclipse.jdt.ls.core.internal.JDTDelegateCommandHandler.executeCommand(JDTDelegateCommandHandler.java:94)\n\tat org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)\n\tat org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)\n\tat org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)\n\tat org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:585)\n\tat org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)\n\tat java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)\n\tat java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)\n\tat java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)\n\tat java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)\n\tat java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)\n\tat java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)\n\tat java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)\n"
Here is what is being sent
[DEBUG][2023-05-22 16:13:01] .../vim/lsp/rpc.lua:284 "rpc.send" { id = 6, jsonrpc = "2.0", method = "workspace/executeCommand", params = { arguments = { "file:///home/asmodeus/.projects/javahehe/src/main/java/com/mycompany/app/App17.java" }, command = "vscode.java.resolveMainClass" }}
- Vorherrschende Sprache
- Java
- Sterne
- 409
- Forks
- 204
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 4
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/java-debug
-
ai-triaged bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/java-debug#611 · 2 Kommentare ·
-
ai-triaged enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/java-debug#608 · 3 Kommentare ·
-
ai-triaged question
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
microsoft/java-debug#597 · 1 Kommentar ·
-
ai-triaged bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
microsoft/java-debug#588 · 1 Kommentar ·
-
ai-triaged question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
microsoft/java-debug#582 · 1 Kommentar ·
Alle Issues in microsoft/java-debug
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
elastic/gradle-plugins#157 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
cryptomator/hub#497 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
johanhaleby/occurrent#1120 ·