From 7d2b1f77fca5375763a5b71b98589ab769a51ce7 Mon Sep 17 00:00:00 2001 From: vinzbarbuto Date: Wed, 16 Oct 2024 10:54:33 -0700 Subject: [PATCH] Renamed view name and Lingo Packages section --- package.json | 2 +- src/lfview/lf-data-provider.ts | 30 +++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e6b734566..0d1270235 100644 --- a/package.json +++ b/package.json @@ -258,7 +258,7 @@ "activitybar": [ { "id": "lf-lang", - "title": "Lingua Franca Projects", + "title": "Lingua Franca Package Explorer", "icon": "images/logo/lf-logo-dark.svg" } ] diff --git a/src/lfview/lf-data-provider.ts b/src/lfview/lf-data-provider.ts index c8b768f9f..16b0228d3 100644 --- a/src/lfview/lf-data-provider.ts +++ b/src/lfview/lf-data-provider.ts @@ -402,6 +402,13 @@ export class LFDataProvider implements vscode.TreeDataProvider item.label === projectLabel); if (!existingProject) { const projectUri = splittedUri.slice(0, srcIdx).join('/') + '/'; @@ -682,7 +689,7 @@ export class LFDataProvider implements vscode.TreeDataProvider { return this.client.onReady().then(() => { @@ -784,18 +791,27 @@ export class LFDataProvider implements vscode.TreeDataProvider { - vscode.window.showTextDocument(doc); - }); + vscode.workspace.openTextDocument(vscode.Uri.file(newUri)) + .then(doc => { + vscode.window.showTextDocument(doc); + }, (error: Error) => { + vscode.window.showErrorMessage(`Failed to open Lingo.toml: ${error.message}`); + }); } } \ No newline at end of file