diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index 2f530cdca7..b34d05802a 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -302,6 +302,7 @@ export async function activate( { await checkForSuccess(result); openApiTreeProvider.refreshView(); + openApiTreeProvider.setSelectionChanged(false); await loadLockFile({fsPath: workspaceJsonPath}, openApiTreeProvider, config.pluginName); await updateTreeViewIcons(treeViewId, false, true); await exportLogsAndShowErrors(result); @@ -344,6 +345,7 @@ export async function activate( { await checkForSuccess(result); openApiTreeProvider.refreshView(); + openApiTreeProvider.setSelectionChanged(false); await loadLockFile({fsPath: workspaceJsonPath}, openApiTreeProvider, config.pluginName); await updateTreeViewIcons(treeViewId, false, true); await exportLogsAndShowErrors(result); @@ -415,6 +417,7 @@ export async function activate( { await checkForSuccess(result); openApiTreeProvider.refreshView(); + openApiTreeProvider.setSelectionChanged(false); await loadLockFile({fsPath: workspaceJsonPath}, openApiTreeProvider, config.clientClassName); await updateTreeViewIcons(treeViewId, false, true); await exportLogsAndShowErrors(result); @@ -452,8 +455,8 @@ export async function activate( ); return result; }); - void vscode.window.showInformationMessage(`Client ${clientKey} re-generated successfully.`); + openApiTreeProvider.setSelectionChanged(false); } async function regeneratePlugin(clientKey: string, clientObject:any, settings: ExtensionSettings, selectedPaths?: string[]) { const pluginTypes = typeof clientObject.pluginTypes === 'string' ? parsePluginType(clientObject.pluginTypes) : KiotaPluginType.ApiPlugin; @@ -487,6 +490,7 @@ export async function activate( return result; }); void vscode.window.showInformationMessage(`Plugin ${clientKey} re-generated successfully.`); + openApiTreeProvider.setSelectionChanged(false); } // create a new status bar item that we can now manage diff --git a/vscode/microsoft-kiota/src/openApiTreeProvider.ts b/vscode/microsoft-kiota/src/openApiTreeProvider.ts index d8313bfef3..ad0310d43f 100644 --- a/vscode/microsoft-kiota/src/openApiTreeProvider.ts +++ b/vscode/microsoft-kiota/src/openApiTreeProvider.ts @@ -171,8 +171,8 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider { this.closeDescription(false); @@ -196,7 +196,7 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider this.selectInternal(x, selected, recursive)); @@ -206,7 +206,7 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider