File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { LabelProviderContribution } from '@theia/core/lib/browser' ;
2
2
import URI from '@theia/core/lib/common/uri' ;
3
- import { FileStat } from '@theia/filesystem/lib/common' ;
3
+ import { FileStat } from '@theia/filesystem/lib/common/files ' ;
4
4
import { injectable } from '@theia/core/shared/inversify' ;
5
5
6
6
@injectable ( )
7
7
export class TreeLabelProviderContribution implements LabelProviderContribution {
8
- canHandle ( uri : object ) : number {
9
- let toCheck = uri ;
8
+
9
+ canHandle ( element : object ) : number {
10
+ let toCheck = element ;
10
11
if ( FileStat . is ( toCheck ) ) {
11
- toCheck = new URI ( toCheck . uri ) ;
12
+ toCheck = toCheck . resource ;
12
13
}
13
14
if ( toCheck instanceof URI ) {
14
15
if ( toCheck . path . ext === '.tree' ) {
@@ -21,6 +22,6 @@ export class TreeLabelProviderContribution implements LabelProviderContribution
21
22
getIcon ( ) : string {
22
23
return 'fa fa-coffee dark-purple' ;
23
24
}
24
-
25
+
25
26
// We don't need to specify getName() nor getLongName() because the default uri label provider is responsible for them.
26
27
}
You can’t perform that action at this time.
0 commit comments