mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
don't change focus to file explorer viewlet when automatically opening sql projects in the open folder (#11583)
This commit is contained in:
@@ -106,7 +106,8 @@ export default class MainController implements vscode.Disposable {
|
|||||||
let results = await glob(sqlprojFilter);
|
let results = await glob(sqlprojFilter);
|
||||||
|
|
||||||
for (let f in results) {
|
for (let f in results) {
|
||||||
await this.projectsController.openProject(vscode.Uri.file(results[f]));
|
// open the project, but don't switch focus to the file explorer viewlet
|
||||||
|
await this.projectsController.openProject(vscode.Uri.file(results[f]), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class ProjectsController {
|
|||||||
this.projectTreeViewProvider.load(this.projects);
|
this.projectTreeViewProvider.load(this.projects);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async openProject(projectFile: vscode.Uri): Promise<Project> {
|
public async openProject(projectFile: vscode.Uri, focusProject: boolean = true): Promise<Project> {
|
||||||
for (const proj of this.projects) {
|
for (const proj of this.projects) {
|
||||||
if (proj.projectFilePath === projectFile.fsPath) {
|
if (proj.projectFilePath === projectFile.fsPath) {
|
||||||
vscode.window.showInformationMessage(constants.projectAlreadyOpened(projectFile.fsPath));
|
vscode.window.showInformationMessage(constants.projectAlreadyOpened(projectFile.fsPath));
|
||||||
@@ -81,7 +81,10 @@ export class ProjectsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.refreshProjectsTree();
|
this.refreshProjectsTree();
|
||||||
await this.focusProject(newProject);
|
|
||||||
|
if (focusProject) {
|
||||||
|
await this.focusProject(newProject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
// if the project didnt load - remove it from the list of open projects
|
// if the project didnt load - remove it from the list of open projects
|
||||||
|
|||||||
Reference in New Issue
Block a user