diff --git a/src/commands/xmlToUdl.ts b/src/commands/xmlToUdl.ts index 7c6f3ba3..fdb21bb7 100644 --- a/src/commands/xmlToUdl.ts +++ b/src/commands/xmlToUdl.ts @@ -13,7 +13,10 @@ export async function previewXMLAsUDL(textEditor: vscode.TextEditor, auto = fals if (notIsfs(uri) && uri.path.toLowerCase().endsWith("xml") && textEditor.document.lineCount > 2) { if (exportHeader.test(textEditor.document.lineAt(1).text)) { const api = new AtelierAPI(uri); - if (!api.active) return; + if (!api.active) { + vscode.window.showErrorMessage("'Preview XML as UDL' command requires an active server connection.", "Dismiss"); + return; + } try { // Convert the file const udlDocs: { name: string; content: string[] }[] = await api