diff --git a/integration/schema-language-server/clients/vscode/package.json b/integration/schema-language-server/clients/vscode/package.json index ab32feee1c4a..14f4265435e0 100644 --- a/integration/schema-language-server/clients/vscode/package.json +++ b/integration/schema-language-server/clients/vscode/package.json @@ -36,8 +36,7 @@ ], "extensions": [ ".sd", - ".profile", - ".yql" + ".profile" ], "configuration": "./language-configuration.json" } diff --git a/integration/schema-language-server/clients/vscode/src/extension.ts b/integration/schema-language-server/clients/vscode/src/extension.ts index 80c97636da12..c720a4791835 100644 --- a/integration/schema-language-server/clients/vscode/src/extension.ts +++ b/integration/schema-language-server/clients/vscode/src/extension.ts @@ -144,7 +144,7 @@ export function activate(context: vscode.ExtensionContext) { }))); - context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.findSchemaDefinition", async (fileName) => { + context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.schema.findSchemaDefinition", async (fileName) => { if (schemaClient === null) { return null; } @@ -161,7 +161,7 @@ export function activate(context: vscode.ExtensionContext) { })); // This command exists to setup schema language server workspace in case the first opened document is an xml file (which not handled by schema language server) - context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.setupWorkspace", async (fileURI) => { + context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.schema.setupWorkspace", async (fileURI) => { if (schemaClient === null) { return; } @@ -175,7 +175,7 @@ export function activate(context: vscode.ExtensionContext) { } })); - context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.hasSetupWorkspace", async () => { + context.subscriptions.push(vscode.commands.registerCommand("vespaSchemaLS.commands.schema.hasSetupWorkspace", async () => { if (schemaClient === null) { return false; } diff --git a/integration/schema-language-server/lemminx-vespa/src/main/java/ai/vespa/lemminx/UnpackRNGFiles.java b/integration/schema-language-server/lemminx-vespa/src/main/java/ai/vespa/lemminx/UnpackRNGFiles.java index 3efe9968921e..6449287effaf 100644 --- a/integration/schema-language-server/lemminx-vespa/src/main/java/ai/vespa/lemminx/UnpackRNGFiles.java +++ b/integration/schema-language-server/lemminx-vespa/src/main/java/ai/vespa/lemminx/UnpackRNGFiles.java @@ -41,12 +41,14 @@ public static void unpackRNGFiles(Path serverPath) throws IOException { Enumeration entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); - if (!entry.isDirectory() && entry.getName().endsWith(".rng")) { + if (!entry.isDirectory() && entry.getName().endsWith(".rng") && entry.getName().startsWith("resources/schema")) { Path writePath = serverPath.resolve(entry.getName()); try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(entry.getName())) { BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); String content = reader.lines().collect(Collectors.joining(System.lineSeparator())); Files.write(writePath, content.getBytes(), StandardOpenOption.CREATE); + } catch (Exception ex) { + // Ignore: unwanted .rng file } } }