Reload ADS when data-workspace extension opens a workspace (#14540)

* reload ADS when workspace is entered

* move reloading so that reload also happens for file save workspace as commands

* fix build error
This commit is contained in:
Kim Santiago
2021-03-04 13:40:13 -08:00
committed by GitHub
parent 69a35b38b2
commit 9cfba8e8e0
3 changed files with 6 additions and 16 deletions

View File

@@ -11,7 +11,6 @@ import { IJSONEditingService } from 'vs/workbench/services/configuration/common/
import { IWorkspacesService, isUntitledWorkspace, IWorkspaceIdentifier, hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces';
import { WorkspaceService } from 'vs/workbench/services/configuration/browser/configurationService';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { basename } from 'vs/base/common/resources';
@@ -42,7 +41,6 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi
@INativeHostService private nativeHostService: INativeHostService,
@IConfigurationService configurationService: IConfigurationService,
@IStorageService private storageService: IStorageService,
@IExtensionService private extensionService: IExtensionService,
@IBackupFileService private backupFileService: IBackupFileService,
@INotificationService notificationService: INotificationService,
@ICommandService commandService: ICommandService,
@@ -176,16 +174,9 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi
}
}
// TODO@aeschli: workaround until restarting works
if (this.environmentService.remoteAuthority) {
this.hostService.reload();
}
// Restart the extension host: entering a workspace means a new location for
// storage and potentially a change in the workspace.rootPath property.
else {
this.extensionService.restartExtensionHost();
}
// {{SQL CARBON EDIT}} - reload instead of restarting extension host because there is state maintained in the core
// that gets lost when the extension host is restarted
this.hostService.reload();
}
private migrateStorage(toWorkspace: IWorkspaceIdentifier): Promise<void> {