Cleanup sql projects tree (#21883)

* remove MessageTreeItem and rename projectUri to relativeProjectUri

* declare variables inline in constructor
This commit is contained in:
Kim Santiago
2023-02-09 11:42:00 -08:00
committed by GitHub
parent 37ad1b0fdb
commit 0e269e0438
9 changed files with 33 additions and 62 deletions

View File

@@ -5,7 +5,7 @@
import * as vscode from 'vscode';
import { BaseProjectTreeItem, SpacerTreeItem } from '../models/tree/baseTreeItem';
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
import { Project } from '../models/project';
@@ -52,11 +52,6 @@ export class SqlDatabaseProjectTreeViewProvider implements vscode.TreeDataProvid
for (const proj of projects) {
newRoots.push(new ProjectRootTreeItem(proj));
newRoots.push(SpacerTreeItem);
}
if (newRoots[newRoots.length - 1] === SpacerTreeItem) {
newRoots.pop(); // get rid of the trailing SpacerTreeItem
}
this.roots = newRoots;