@@ -448,6 +448,7 @@ export class ProjectPanelProvider implements vscode.TreeDataProvider<TreeNode> {
448
448
private disposables : vscode . Disposable [ ] = [ ] ;
449
449
private activeTasks : Set < string > = new Set ( ) ;
450
450
private lastComputedNodes : TreeNode [ ] = [ ] ;
451
+ private buildPluginOutputWatcher ?: vscode . FileSystemWatcher ;
451
452
452
453
onDidChangeTreeData = this . didChangeTreeDataEmitter . event ;
453
454
@@ -540,24 +541,17 @@ export class ProjectPanelProvider implements vscode.TreeDataProvider<TreeNode> {
540
541
) ;
541
542
}
542
543
543
- private buildPluginOutputWatcher ?: vscode . FileSystemWatcher ;
544
-
545
544
watchBuildPluginOutputs ( folderContext : FolderContext ) {
546
545
if ( this . buildPluginOutputWatcher ) {
547
546
this . buildPluginOutputWatcher . dispose ( ) ;
548
547
}
549
548
this . buildPluginOutputWatcher = vscode . workspace . createFileSystemWatcher (
550
- new vscode . RelativePattern ( folderContext . folder , ".build/plugins/outputs/* */*" )
549
+ new vscode . RelativePattern ( folderContext . folder , ".build/plugins/outputs/{*, */*} " )
551
550
) ;
552
- this . buildPluginOutputWatcher . onDidCreate ( ( ) => {
553
- this . didChangeTreeDataEmitter . fire ( ) ;
554
- } ) ;
555
- this . buildPluginOutputWatcher . onDidDelete ( ( ) => {
556
- this . didChangeTreeDataEmitter . fire ( ) ;
557
- } ) ;
558
- this . buildPluginOutputWatcher . onDidChange ( ( ) => {
559
- this . didChangeTreeDataEmitter . fire ( ) ;
560
- } ) ;
551
+ const fire = ( ) => this . didChangeTreeDataEmitter . fire ( ) ;
552
+ this . buildPluginOutputWatcher . onDidCreate ( fire ) ;
553
+ this . buildPluginOutputWatcher . onDidDelete ( fire ) ;
554
+ this . buildPluginOutputWatcher . onDidChange ( fire ) ;
561
555
}
562
556
563
557
getTreeItem ( element : TreeNode ) : vscode . TreeItem {
0 commit comments