File tree 1 file changed +14
-1
lines changed
arduino-ide-extension/src/browser/theia/markers
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
- import { inject , injectable , postConstruct } from '@theia/core/shared/inversify' ;
1
+ import {
2
+ inject ,
3
+ injectable ,
4
+ postConstruct ,
5
+ } from '@theia/core/shared/inversify' ;
2
6
import { Diagnostic } from 'vscode-languageserver-types' ;
3
7
import URI from '@theia/core/lib/common/uri' ;
4
8
import { ILogger } from '@theia/core' ;
5
9
import { Marker } from '@theia/markers/lib/common/marker' ;
6
10
import { ProblemManager as TheiaProblemManager } from '@theia/markers/lib/browser/problem/problem-manager' ;
7
11
import { ConfigService } from '../../../common/protocol/config-service' ;
12
+ import debounce = require( 'lodash.debounce' ) ;
8
13
9
14
@injectable ( )
10
15
export class ProblemManager extends TheiaProblemManager {
@@ -37,4 +42,12 @@ export class ProblemManager extends TheiaProblemManager {
37
42
}
38
43
return super . setMarkers ( uri , owner , data ) ;
39
44
}
45
+
46
+ private readonly debouncedFireOnDidChangeMakers = debounce (
47
+ ( uri : URI ) => this . onDidChangeMarkersEmitter . fire ( uri ) ,
48
+ 500
49
+ ) ;
50
+ protected override fireOnDidChangeMarkers ( uri : URI ) : void {
51
+ this . debouncedFireOnDidChangeMakers ( uri ) ;
52
+ }
40
53
}
You can’t perform that action at this time.
0 commit comments