mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Data workspace projects changes (#13466)
* Fix project context menu actions (#12541) * delete works again * make fewer changes * update all sql db project commands * cleanup * Remove old projects view (#12563) * remove old projects view from file explorer view * fix tests failing * remove projects in open folder opening up in old view * Update db reference dialog to show projects in the workspace (#12580) * update database reference dialog to show projects in the workspace in the project dropdown * remove workspace stuff from sql projects extension * undo change * add class that implements IExtension * undo a change * update DataWorkspaceExtension to take workspaceService as a parameter * add type * Update sql database project commands (#12595) * remove sql proj's open and create new project from comman palette * hook up create project from database to data workspace * rename the remaining import databases to create project from database * remove open, new, and close commands * expose addProjectsToWorkspace() in IExtension instead of calling command * Addressing comments * fix failing sql project tests (#12651) * update SSDT projects opened in projects viewlet (#12669) * fix action not refreshing the tree issue (#12692) * fix adding project references in new projects viewlet (#12688) * Remove old projects tree provider (#12702) * Remove old projects tree provider and fix tests * formatting * update refreshProjectsTree() to accept workspaceTreeItem() * Cleanup ProjectsController (#12718) * remove openProject from ProjectController and some cleanup * rename * add project and open project dialogs (#12729) * empty dialogs * wip * new project dialog implementation * revert gitattributes * open project dialog * implement add project * remove icon helper * refactor * revert script change * adjust views * more updates * make data-workspace a builtin extension * show the view only when project provider is detected (#12819) * only show the view when proj provider is available * update * fix sql project tests after merge (#12793) * Update dialogs to be closer to mockups (#12879) * small UI changes to dialogs * center radio card group text * Create workspace if needed when opening/new project (#12930) * empty dialogs * wip * new project dialog implementation * revert gitattributes * open project dialog * implement add project * remove icon helper * refactor * revert script change * create workspace * initial changes * create new workspace working * fix tests * cleanup * remove showWorkspaceRequiredNotification() * Add test for no workspace open * update blue buttons * move loading temp project to activate() instead of workspaceService constructor * move workspace creation warning message to before project is created * pass uri to createWorkspace * add tests Co-authored-by: Alan Ren <alanren@microsoft.com> * Additional create workspace changes (#13004) * Dialogs workspace updates (#13010) * adding workspace text boxes * match new project dialog to mockups * Add validation error message for workspace file * add enterWorkspace api * add warning message for opening workspace * cleanup * update commands to remove project so they're more generic * remove 'empty' from string * Move default project location setting to data workspace extension (#13022) * remove project location setting and notification from sql database projects extension * add default project location setting to data workspace extension * fix typo * Add back project name incrementing * other merge fixes * fix strings from other PR * default to last opened directory instead of home directory if no specified default location * A few small updates (#13092) * fix build error * update title for inputboxes * add missing file * Add tests for data workspace dialogs (#13324) * add tests for dialogs * create helper functions * New project dialog workspace inputbox fixes (#13407) * workspace inputbox fixes * fix folder icons * Update package.jsons and readme (#13451) * update package.jsons * update readme * add workspace information to open existing dialog (#13455) Co-authored-by: Alan Ren <alanren@microsoft.com>
This commit is contained in:
@@ -23,12 +23,13 @@ export const MicrosoftDatatoolsSchemaSqlSql = 'Microsoft.Data.Tools.Schema.Sql.S
|
||||
export const databaseSchemaProvider = 'DatabaseSchemaProvider';
|
||||
|
||||
// Project Provider
|
||||
export const projectTypeDisplayName = localize('projectTypeDisplayName', 'Database Project');
|
||||
export const sqlDatabaseProjectTypeId = 'sqldbproj';
|
||||
export const projectTypeDisplayName = localize('projectTypeDisplayName', "SQL Database");
|
||||
export const projectTypeDescription = localize('projectTypeDescription', "Design, edit, and publish schemas for SQL databases");
|
||||
|
||||
// commands
|
||||
export const revealFileInOsCommand = 'revealFileInOS';
|
||||
export const schemaCompareStartCommand = 'schemaCompare.start';
|
||||
export const sqlDatabaseProjectsViewFocusCommand = 'sqlDatabaseProjectsView.focus';
|
||||
export const vscodeOpenCommand = 'vscode.open';
|
||||
|
||||
// UI Strings
|
||||
@@ -54,10 +55,6 @@ export const objectType = localize('objectType', "Object Type");
|
||||
export const schema = localize('schema', "Schema");
|
||||
export const schemaObjectType = localize('schemaObjectType', "Schema/Object Type");
|
||||
export const defaultProjectNameStarter = localize('defaultProjectNameStarter', "DatabaseProject");
|
||||
export const newDefaultProjectSaveLocation = localize('newDefaultProjectSaveLocation', "Would you like to update the default location to save new database projects?");
|
||||
export const invalidDefaultProjectSaveLocation = localize('invalidDefaultProjectSaveLocation', "Default location to save new database projects is invalid. Would you like to update it?");
|
||||
export const openWorkspaceSettings = localize('openWorkspaceSettings', "Yes, open Settings");
|
||||
export const doNotPromptAgain = localize('doNotPromptAgain', "Don't ask again");
|
||||
export const reloadProject = localize('reloadProject', "Would you like to reload your database project?");
|
||||
export function newObjectNamePrompt(objectType: string) { return localize('newObjectNamePrompt', 'New {0} name:', objectType); }
|
||||
export function deleteConfirmation(toDelete: string) { return localize('deleteConfirmation', "Are you sure you want to delete {0}?", toDelete); }
|
||||
@@ -95,7 +92,7 @@ export const defaultUser = localize('default', "default");
|
||||
export const addDatabaseReferenceDialogName = localize('addDatabaseReferencedialogName', "Add database reference");
|
||||
export const addDatabaseReferenceOkButtonText = localize('addDatabaseReferenceOkButtonText', "Add reference");
|
||||
export const referenceRadioButtonsGroupTitle = localize('referenceRadioButtonsGroupTitle', "Type");
|
||||
export const projectRadioButtonTitle = localize('projectRadioButtonTitle', "Database project in folder");
|
||||
export const projectRadioButtonTitle = localize('projectRadioButtonTitle', "Project");
|
||||
export const systemDatabaseRadioButtonTitle = localize('systemDatabaseRadioButtonTitle', "System database");
|
||||
export const dacpacText = localize('dacpacText', "Data-tier application (.dacpac)");
|
||||
export const dacpacPlaceholder = localize('dacpacPlaceholder', "Select .dacpac");
|
||||
@@ -259,11 +256,6 @@ export const activeDirectoryInteractive = 'active directory interactive';
|
||||
export const userIdSetting = 'User ID';
|
||||
export const passwordSetting = 'Password';
|
||||
|
||||
// Workspace settings for saving new database projects
|
||||
export const dbProjectConfigurationKey = 'sqlDatabaseProjects';
|
||||
export const projectSaveLocationKey = 'defaultProjectSaveLocation';
|
||||
export const showUpdatePromptKey = 'showUpdateSaveLocationPrompt';
|
||||
|
||||
// Authentication types
|
||||
export const integratedAuth = 'Integrated';
|
||||
export const azureMfaAuth = 'AzureMFA';
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface IconPath {
|
||||
export class IconPathHelper {
|
||||
private static extensionContext: vscode.ExtensionContext;
|
||||
public static databaseProject: IconPath;
|
||||
public static colorfulSqlProject: IconPath;
|
||||
|
||||
public static dataSourceGroup: IconPath;
|
||||
public static dataSourceSql: IconPath;
|
||||
@@ -31,6 +32,7 @@ export class IconPathHelper {
|
||||
IconPathHelper.extensionContext = extensionContext;
|
||||
|
||||
IconPathHelper.databaseProject = IconPathHelper.makeIcon('databaseProject');
|
||||
IconPathHelper.colorfulSqlProject = IconPathHelper.makeIcon('colorfulSqlProject', true);
|
||||
|
||||
IconPathHelper.dataSourceGroup = IconPathHelper.makeIcon('dataSourceGroup');
|
||||
IconPathHelper.dataSourceSql = IconPathHelper.makeIcon('dataSource-sql');
|
||||
|
||||
@@ -8,6 +8,7 @@ import * as os from 'os';
|
||||
import * as constants from './constants';
|
||||
import * as path from 'path';
|
||||
import * as glob from 'fast-glob';
|
||||
import * as dataworkspace from 'dataworkspace';
|
||||
import * as mssql from '../../../mssql';
|
||||
import { promises as fs } from 'fs';
|
||||
|
||||
@@ -217,7 +218,7 @@ export function isValidSqlCmdVariableName(name: string | undefined): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Recursively gets all the sqlproj files at any depth in a folder
|
||||
* @param folderPath
|
||||
*/
|
||||
@@ -231,6 +232,19 @@ export async function getSqlProjectFilesInFolder(folderPath: string): Promise<st
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the projects in the workspace that are sqlproj
|
||||
*/
|
||||
export function getSqlProjectsInWorkspace(): vscode.Uri[] {
|
||||
const api = getDataWorkspaceExtensionApi();
|
||||
return api.getProjectsInWorkspace().filter((p: vscode.Uri) => path.extname(p.fsPath) === constants.sqlprojExtension);
|
||||
}
|
||||
|
||||
export function getDataWorkspaceExtensionApi(): dataworkspace.IExtension {
|
||||
const extension = vscode.extensions.getExtension(dataworkspace.extension.name)!;
|
||||
return extension.exports;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the default deployment options from DacFx
|
||||
*/
|
||||
export async function GetDefaultDeploymentOptions(): Promise<mssql.DeploymentOptions> {
|
||||
|
||||
Reference in New Issue
Block a user