@@ -468,6 +468,7 @@ export class ProjectPanelProvider implements vscode.TreeDataProvider<TreeNode> {
468
468
private disposables : vscode . Disposable [ ] = [ ] ;
469
469
private activeTasks : Set < string > = new Set ( ) ;
470
470
private lastComputedNodes : TreeNode [ ] = [ ] ;
471
+ private buildPluginOutputWatcher ?: vscode . FileSystemWatcher ;
471
472
472
473
onDidChangeTreeData = this . didChangeTreeDataEmitter . event ;
473
474
@@ -560,24 +561,17 @@ export class ProjectPanelProvider implements vscode.TreeDataProvider<TreeNode> {
560
561
) ;
561
562
}
562
563
563
- private buildPluginOutputWatcher ?: vscode . FileSystemWatcher ;
564
-
565
564
watchBuildPluginOutputs ( folderContext : FolderContext ) {
566
565
if ( this . buildPluginOutputWatcher ) {
567
566
this . buildPluginOutputWatcher . dispose ( ) ;
568
567
}
569
568
this . buildPluginOutputWatcher = vscode . workspace . createFileSystemWatcher (
570
- new vscode . RelativePattern ( folderContext . folder , ".build/plugins/outputs/* */*" )
569
+ new vscode . RelativePattern ( folderContext . folder , ".build/plugins/outputs/{*, */*} " )
571
570
) ;
572
- this . buildPluginOutputWatcher . onDidCreate ( ( ) => {
573
- this . didChangeTreeDataEmitter . fire ( ) ;
574
- } ) ;
575
- this . buildPluginOutputWatcher . onDidDelete ( ( ) => {
576
- this . didChangeTreeDataEmitter . fire ( ) ;
577
- } ) ;
578
- this . buildPluginOutputWatcher . onDidChange ( ( ) => {
579
- this . didChangeTreeDataEmitter . fire ( ) ;
580
- } ) ;
571
+ const fire = ( ) => this . didChangeTreeDataEmitter . fire ( ) ;
572
+ this . buildPluginOutputWatcher . onDidCreate ( fire ) ;
573
+ this . buildPluginOutputWatcher . onDidDelete ( fire ) ;
574
+ this . buildPluginOutputWatcher . onDidChange ( fire ) ;
581
575
}
582
576
583
577
getTreeItem ( element : TreeNode ) : vscode . TreeItem {
0 commit comments