mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Adding SQL Edge project template (#13558)
* Checkpoint * removing flag for not creating subfolder * Adding Edge template * Removing janky map function * Adding templates for additional objects * Updating tests, fixing bug * Added Edge project icon * Updating strings to Drew-approved text * Cleaning up template scripts and Edge project template names
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as dataworkspace from 'dataworkspace';
|
||||
import * as vscode from 'vscode';
|
||||
import { sqlprojExtension, projectTypeDisplayName, projectTypeDescription, sqlDatabaseProjectTypeId } from '../common/constants';
|
||||
import * as constants from '../common/constants';
|
||||
import { IconPathHelper } from '../common/iconHelper';
|
||||
import { SqlDatabaseProjectTreeViewProvider } from '../controllers/databaseProjectTreeViewProvider';
|
||||
import { ProjectsController } from '../controllers/projectController';
|
||||
@@ -44,11 +44,18 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
|
||||
*/
|
||||
get supportedProjectTypes(): dataworkspace.IProjectType[] {
|
||||
return [{
|
||||
id: sqlDatabaseProjectTypeId,
|
||||
projectFileExtension: sqlprojExtension.replace(/\./g, ''),
|
||||
displayName: projectTypeDisplayName,
|
||||
description: projectTypeDescription,
|
||||
id: constants.emptySqlDatabaseProjectTypeId,
|
||||
projectFileExtension: constants.sqlprojExtension.replace(/\./g, ''),
|
||||
displayName: constants.emptyProjectTypeDisplayName,
|
||||
description: constants.emptyProjectTypeDescription,
|
||||
icon: IconPathHelper.colorfulSqlProject
|
||||
},
|
||||
{
|
||||
id: constants.edgeSqlDatabaseProjectTypeId,
|
||||
projectFileExtension: constants.sqlprojExtension.replace(/\./g, ''),
|
||||
displayName: constants.edgeProjectTypeDisplayName,
|
||||
description: constants.edgeProjectTypeDescription,
|
||||
icon: IconPathHelper.sqlEdgeProject
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -56,10 +63,16 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
|
||||
* Create a project
|
||||
* @param name name of the project
|
||||
* @param location the parent directory
|
||||
* @param projectTypeId the ID of the project/template
|
||||
* @returns Uri of the newly created project file
|
||||
*/
|
||||
async createProject(name: string, location: vscode.Uri, _: string): Promise<vscode.Uri> {
|
||||
const projectFile = await this.projectController.createNewProject(name, location, true);
|
||||
async createProject(name: string, location: vscode.Uri, projectTypeId: string): Promise<vscode.Uri> {
|
||||
const projectFile = await this.projectController.createNewProject({
|
||||
newProjName: name,
|
||||
folderUri: location,
|
||||
projectTypeId: projectTypeId
|
||||
});
|
||||
|
||||
return vscode.Uri.file(projectFile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user