mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 17:23:29 -05:00
Show error if trying to create or open project when no project extension is installed (#22021)
* show error if trying to create or open project when no project extensions are found * only check if project providers are available on startup and when extensions change * addressing comments * Update extensions/data-workspace/src/services/workspaceService.ts use some instead of find Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -23,6 +23,7 @@ export const gitCloneError = localize('gitCloneError', "Error during git clone.
|
||||
export const openedProjectsUndefinedAfterRefresh = localize('openedProjectsUndefinedAfterRefresh', "List of opened projects should not be undefined after refresh from disk.");
|
||||
export const dragAndDropNotSupported = localize('dragAndDropNotSupported', "This project type does not support drag and drop.");
|
||||
export const onlyMovingOneFileIsSupported = localize('onlyMovingOneFileIsSupported', "Only moving one file at a time is supported.");
|
||||
export const noProjectProvidingExtensionsInstalled = localize('noProjectProvidingExtensionsInstalled', "No database project extensions are installed. Please install a database project extension to use this feature.");
|
||||
|
||||
// UI
|
||||
export const OkButtonText = localize('dataworkspace.ok', "OK");
|
||||
|
||||
@@ -9,6 +9,7 @@ import { WorkspaceService } from '../services/workspaceService';
|
||||
import { defaultProjectSaveLocation } from './projectLocationHelper';
|
||||
import { openSpecificProjectNewProjectDialog } from '../dialogs/newProjectDialog';
|
||||
import { isValidBasename, isValidBasenameErrorMessage, isValidFilenameCharacter, sanitizeStringForFilename } from './pathUtilsHelper';
|
||||
import { noProjectProvidingExtensionsInstalled } from './constants';
|
||||
|
||||
export class DataWorkspaceExtension implements IExtension {
|
||||
constructor(private workspaceService: WorkspaceService) {
|
||||
@@ -39,6 +40,10 @@ export class DataWorkspaceExtension implements IExtension {
|
||||
}
|
||||
|
||||
openSpecificProjectNewProjectDialog(projectType: IProjectType): Promise<vscode.Uri | undefined> {
|
||||
if (!this.workspaceService.isProjectProviderAvailable) {
|
||||
void vscode.window.showErrorMessage(noProjectProvidingExtensionsInstalled);
|
||||
}
|
||||
|
||||
return openSpecificProjectNewProjectDialog(projectType, this.workspaceService);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user