mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
[atl-1433][atl-1433] improve local sketchbook explorer (#446)
This commit is contained in:
@@ -48,23 +48,11 @@ export class SketchbookTreeWidget extends FileTreeWidget {
|
||||
@postConstruct()
|
||||
protected async init(): Promise<void> {
|
||||
super.init();
|
||||
this.toDispose.push(
|
||||
this.arduinoPreferences.onPreferenceChanged(({ preferenceName }) => {
|
||||
if (preferenceName === 'arduino.sketchbook.showAllFiles') {
|
||||
this.updateModel();
|
||||
}
|
||||
})
|
||||
);
|
||||
this.updateModel();
|
||||
// cache the current open sketch uri
|
||||
const currentSketch = await this.sketchServiceClient.currentSketch();
|
||||
this.currentSketchUri = (currentSketch && currentSketch.uri) || '';
|
||||
}
|
||||
|
||||
async updateModel(): Promise<void> {
|
||||
return this.model.updateRoot();
|
||||
}
|
||||
|
||||
protected createNodeClassNames(node: TreeNode, props: NodeProps): string[] {
|
||||
const classNames = super.createNodeClassNames(node, props);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user