1
0
mirror of https://github.com/zerobig/vscode-1c-metadata-viewer.git synced 2025-02-16 12:53:51 +02:00

Ещё одна правка по задаче #22. Предыдущая помогла не до конца

This commit is contained in:
Ilya Bushin 2024-03-09 14:02:43 +03:00
parent ab2e28151b
commit 0ff309c3e0

View File

@ -108,12 +108,9 @@ export class MetadataView {
});
vscode.workspace.workspaceFolders?.forEach(folder => {
LoadAndParseConfigurationXml(folder.uri);
//view.reveal(tree[0]);
LoadAndParseConfigurationXml(folder.uri, dataProvider);
});
dataProvider.update();
vscode.commands.registerCommand('metadataViewer.showTemplate', (template) => this.openTemplate(context, template));
vscode.commands.registerCommand('metadataViewer.openPredefinedData', (item) => this.openPredefinedData(context, item));
vscode.commands.registerCommand('metadataViewer.openHandler', (item) => this.openHandler(item));
@ -352,7 +349,7 @@ const tree: TreeItem[] = [
GetTreeItem('configurations', 'Конфигурации', { children: [] })
];
function LoadAndParseConfigurationXml(uri: vscode.Uri) {
function LoadAndParseConfigurationXml(uri: vscode.Uri, dataProvider: NodeWithIdTreeDataProvider) {
console.time('glob');
const files = glob.sync([ '**/ConfigDumpInfo.xml', '**/Configuration.xml' ], {
dot: true,
@ -396,6 +393,8 @@ function LoadAndParseConfigurationXml(uri: vscode.Uri) {
treeItem.isConfiguration = true;
tree[0].children?.push(treeItem);
dataProvider.update();
});
});
}