Skip to content

Commit f15fecb

Browse files
committed
Editor filebrowser now contains the project solution file
1 parent ad6df70 commit f15fecb

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lib/editor.dart

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ class _EditorPageState extends State<EditorPage> {
9393

9494
void initializeTreeView() async {
9595
List<Document> docs = List.empty(growable: true);
96+
97+
// Add folders from the solution file
9698
for (var key in project.folders.keys) {
9799
var dir = project.slnFolderPath +
98100
Platform.pathSeparator +
99101
(project.folders[key])!;
100102
List<Document> children = readFolder(Directory(dir));
101-
//await
103+
102104
Document node = Document(
103105
name: key,
104106
dateModified: DateTime.now(),
@@ -109,6 +111,18 @@ class _EditorPageState extends State<EditorPage> {
109111

110112
docs.add(node);
111113
}
114+
115+
// Add the solution file itself
116+
Document node = Document(
117+
name: project.name,
118+
dateModified: DateTime.now(),
119+
isFile: true,
120+
childData: [],
121+
path: project.slnPath,
122+
);
123+
124+
docs.add(node);
125+
112126
setState(() {
113127
documentList = docs;
114128
});

0 commit comments

Comments
 (0)