Add setting to hide netcore installation prompt (#15470)

* Add setting to hide netcore installation prompt

* Shortened strings to fit toast

* Updating data workspace string for consistency
This commit is contained in:
Benjin Dubishar
2021-05-17 09:59:08 -07:00
committed by GitHub
parent faf4c9232b
commit 7e8dccec82
7 changed files with 23 additions and 13 deletions

View File

@@ -18,8 +18,8 @@ export const OpenWorkspace = localize('dataworkspace.openWorkspace', "Open Works
export const CreateWorkspaceConfirmation = localize('dataworkspace.createWorkspaceConfirmation', "A workspace will be created and opened in order to open project. Azure Data Studio will restart and if there is a folder currently open, it will be closed.");
export const EnterWorkspaceConfirmation = localize('dataworkspace.enterWorkspaceConfirmation', "To open this workspace, Azure Data Studio will restart. If there is a workspace or folder currently open, it will be closed.");
export const WorkspaceContainsNotAddedProjects = localize('dataworkspace.workspaceContainsNotAddedProjects', "The current workspace contains one or more projects that have not been added to the workspace. Use the 'Open existing' dialog to add projects to the projects pane.");
export const LaunchOpenExisitingDialog = localize('dataworkspace.launchOpenExistingDialog', "Launch Open existing dialog");
export const DoNotShowAgain = localize('dataworkspace.doNotShowAgain', "Do not show again");
export const LaunchOpenExisitingDialog = localize('dataworkspace.launchOpenExistingDialog', "Launch 'Open Existing' Dialog");
export const DoNotAskAgain = localize('dataworkspace.doNotAskAgain', "Don't Ask Again");
export const ProjectsFailedToLoad = localize('dataworkspace.projectsFailedToLoad', "Some projects failed to load. To view more details, [open the developer console](command:workbench.action.toggleDevTools)");
export const fileDoesNotExist = (name: string): string => { return localize('fileDoesNotExist', "File '{0}' doesn't exist", name); };
export const projectNameNull = localize('projectNameNull', "Project name is null");

View File

@@ -206,11 +206,11 @@ export class WorkspaceService implements IWorkspaceService {
}
if (containsNotAddedProject) {
const result = await vscode.window.showInformationMessage(constants.WorkspaceContainsNotAddedProjects, constants.LaunchOpenExisitingDialog, constants.DoNotShowAgain);
const result = await vscode.window.showInformationMessage(constants.WorkspaceContainsNotAddedProjects, constants.LaunchOpenExisitingDialog, constants.DoNotAskAgain);
if (result === constants.LaunchOpenExisitingDialog) {
// open settings
await vscode.commands.executeCommand('projects.openExisting');
} else if (result === constants.DoNotShowAgain) {
} else if (result === constants.DoNotAskAgain) {
await config.update(constants.showNotAddedProjectsMessageKey, false, true);
}

View File

@@ -427,7 +427,7 @@ suite('WorkspaceService Tests', function (): void {
description: '',
icon: ''
}]);
const infoMessageStub = sinon.stub(vscode.window, 'showInformationMessage').resolves(<any>constants.DoNotShowAgain);
const infoMessageStub = sinon.stub(vscode.window, 'showInformationMessage').resolves(<any>constants.DoNotAskAgain);
const getProjectsInwWorkspaceFolderStub = sinon.stub(service, 'getAllProjectsInFolder').resolves([vscode.Uri.file('abc.sqlproj').fsPath, vscode.Uri.file('folder1/abc1.sqlproj').fsPath]);
await service.checkForProjectsNotAddedToWorkspace();