This is an automated email from the ASF dual-hosted git repository.
sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new db06b0c878 VSCode: Limit findPath to file URLs only.
new f9dab3b1c9 Merge pull request #5643 from
dbalek/dbalek/lsp-find-path-for-files
db06b0c878 is described below
commit db06b0c878f7634711688a004c284360b4741d3c
Author: Dusan Balek <[email protected]>
AuthorDate: Thu Mar 9 16:20:43 2023 +0100
VSCode: Limit findPath to file URLs only.
---
java/java.lsp.server/vscode/src/extension.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/java/java.lsp.server/vscode/src/extension.ts
b/java/java.lsp.server/vscode/src/extension.ts
index e880871f7b..a2e653e0c2 100644
--- a/java/java.lsp.server/vscode/src/extension.ts
+++ b/java/java.lsp.server/vscode/src/extension.ts
@@ -1072,13 +1072,14 @@ function doActivateWithJDK(specifiedJDK: string | null,
context: ExtensionContex
let tv : vscode.TreeView<Visualizer> = await
ts.createView('foundProjects', 'Projects', { canSelectMany : false });
async function revealActiveEditor(ed? : vscode.TextEditor) {
- if (!window.activeTextEditor?.document?.uri) {
+ const uri = window.activeTextEditor?.document?.uri;
+ if (!uri || uri.scheme.toLowerCase() !== 'file') {
return;
}
if (!tv.visible) {
return;
}
- let vis : Visualizer | undefined = await ts.findPath(tv,
window.activeTextEditor?.document?.uri?.toString());
+ let vis : Visualizer | undefined = await ts.findPath(tv,
uri.toString());
if (!vis) {
return;
}
---------------------------------------------------------------------
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