mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
* update create project from database dialog to have editable new workspace * add validation * add test * add error message * Remove test for now * cleanup * add periods * throw errors * change return type to void
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as vscode from 'vscode';
|
|
import { IExtension } from 'dataworkspace';
|
|
import { WorkspaceService } from '../services/workspaceService';
|
|
import { defaultProjectSaveLocation } from './projectLocationHelper';
|
|
|
|
export class DataWorkspaceExtension implements IExtension {
|
|
constructor(private workspaceService: WorkspaceService) {
|
|
}
|
|
|
|
getProjectsInWorkspace(): vscode.Uri[] {
|
|
return this.workspaceService.getProjectsInWorkspace();
|
|
}
|
|
|
|
addProjectsToWorkspace(projectFiles: vscode.Uri[], workspaceFilePath?: vscode.Uri): Promise<void> {
|
|
return this.workspaceService.addProjectsToWorkspace(projectFiles, workspaceFilePath);
|
|
}
|
|
|
|
showProjectsView(): void {
|
|
vscode.commands.executeCommand('dataworkspace.views.main.focus');
|
|
}
|
|
|
|
get defaultProjectSaveLocation(): vscode.Uri | undefined {
|
|
return defaultProjectSaveLocation();
|
|
}
|
|
|
|
validateWorkspace(): Promise<boolean> {
|
|
return this.workspaceService.validateWorkspace();
|
|
}
|
|
|
|
}
|