Reputation: 41
We are building an extension that visualizes some data for workspace files in our view using a class derived from TreeDataProvider
. We wonder if there is a way to use file icons contributed by the current File Icons Theme for our custom tree items. Base icon class has a field icon: ThemeIcon
which supports product icons. Wonder if something similar exists for referring to file-type icons?
Thanks
Upvotes: 1
Views: 646
Reputation: 41
Seems like using resourceUri
and ThemeIcon.File
is the way to do it:
this.iconPath = ThemeIcon.File;
this.resourceUri = Uri.parse('_.js');
Upvotes: 3