Skip to content

Commit 18f4ada

Browse files
authored
Show error message when Preview XML as UDL is run without an active server connection (#1552)
1 parent be778b0 commit 18f4ada

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/xmlToUdl.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export async function previewXMLAsUDL(textEditor: vscode.TextEditor, auto = fals
1313
if (notIsfs(uri) && uri.path.toLowerCase().endsWith("xml") && textEditor.document.lineCount > 2) {
1414
if (exportHeader.test(textEditor.document.lineAt(1).text)) {
1515
const api = new AtelierAPI(uri);
16-
if (!api.active) return;
16+
if (!api.active) {
17+
vscode.window.showErrorMessage("'Preview XML as UDL' command requires an active server connection.", "Dismiss");
18+
return;
19+
}
1720
try {
1821
// Convert the file
1922
const udlDocs: { name: string; content: string[] }[] = await api

0 commit comments

Comments
 (0)