mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Add reference to another sql project (#12186)
* add projects to add database reference dialog * able to add project references * check for circular dependency * only allow adding reference to project in the same workspace * fix location dropdown when project reference is enabled * add tests * more tests * cleanup * fix flakey test * addressing comments
This commit is contained in:
@@ -9,11 +9,10 @@ import * as dataworkspace from 'dataworkspace';
|
||||
import * as templates from '../templates/templates';
|
||||
import * as constants from '../common/constants';
|
||||
import * as path from 'path';
|
||||
import * as glob from 'fast-glob';
|
||||
import * as newProjectTool from '../tools/newProjectTool';
|
||||
|
||||
import { SqlDatabaseProjectTreeViewProvider } from './databaseProjectTreeViewProvider';
|
||||
import { getErrorMessage } from '../common/utils';
|
||||
import { getErrorMessage, getSqlProjectFilesInFolder } from '../common/utils';
|
||||
import { ProjectsController } from './projectController';
|
||||
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
|
||||
import { NetCoreTool } from '../tools/netcoreTool';
|
||||
@@ -113,10 +112,7 @@ export default class MainController implements vscode.Disposable {
|
||||
}
|
||||
|
||||
public async loadProjectsInFolder(folderPath: string): Promise<void> {
|
||||
// path needs to use forward slashes for glob to work
|
||||
let escapedPath = glob.escapePath(folderPath.replace(/\\/g, '/'));
|
||||
let sqlprojFilter = path.posix.join(escapedPath, '**', '*.sqlproj');
|
||||
let results = await glob(sqlprojFilter);
|
||||
const results = await getSqlProjectFilesInFolder(folderPath);
|
||||
|
||||
for (let f in results) {
|
||||
// open the project, but don't switch focus to the file explorer viewlet
|
||||
|
||||
Reference in New Issue
Block a user