mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 01:25:38 -05:00
Expose refresh projects tree (#18890)
* refresh project tree after apply schema compare to project * clarify comment
This commit is contained in:
@@ -25,6 +25,10 @@ export class DataWorkspaceExtension implements IExtension {
|
||||
void vscode.commands.executeCommand('dataworkspace.views.main.focus');
|
||||
}
|
||||
|
||||
refreshProjectsTree(): void {
|
||||
this.workspaceService.refreshProjectsTree();
|
||||
}
|
||||
|
||||
get defaultProjectSaveLocation(): vscode.Uri | undefined {
|
||||
return defaultProjectSaveLocation();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,11 @@ declare module 'dataworkspace' {
|
||||
*/
|
||||
showProjectsView(): void;
|
||||
|
||||
/**
|
||||
* Fires event to refresh the project tree. The tree is not guaranteed to be refreshed after this call returns
|
||||
*/
|
||||
refreshProjectsTree(): void;
|
||||
|
||||
/**
|
||||
* Returns the default location to save projects
|
||||
*/
|
||||
|
||||
@@ -168,6 +168,13 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire event to refresh projects tree
|
||||
*/
|
||||
public refreshProjectsTree(): void {
|
||||
this._onDidWorkspaceProjectsChange.fire();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all the supported projects in the folder
|
||||
* @param folder folder to look look for projects
|
||||
|
||||
@@ -914,6 +914,7 @@ export class SchemaCompareMainWindow {
|
||||
} else if (this.targetEndpointInfo.endpointType === mssql.SchemaCompareEndpointType.Project) {
|
||||
const workspaceApi = getDataWorkspaceExtensionApi();
|
||||
workspaceApi.showProjectsView();
|
||||
workspaceApi.refreshProjectsTree();
|
||||
|
||||
void vscode.window.showInformationMessage(loc.applySuccess);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user