mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
Improve remote sketchbook explorer (#459)
* Refactor remote sketchbook explorer * sketches sorting
This commit is contained in:
@@ -100,10 +100,7 @@ export class SketchbookWidgetContribution
|
||||
|
||||
registry.registerCommand(SketchbookCommands.OPEN_NEW_WINDOW, {
|
||||
execute: async (arg) => {
|
||||
const underlying = await this.fileService.toUnderlyingResource(
|
||||
arg.node.uri
|
||||
);
|
||||
return this.workspaceService.open(underlying);
|
||||
return this.workspaceService.open(arg.node.uri);
|
||||
},
|
||||
isEnabled: (arg) =>
|
||||
!!arg && 'node' in arg && SketchbookTree.SketchDirNode.is(arg.node),
|
||||
@@ -214,7 +211,8 @@ export class SketchbookWidgetContribution
|
||||
if (Navigatable.is(widget)) {
|
||||
const resourceUri = widget.getResourceUri();
|
||||
if (resourceUri) {
|
||||
const { model } = (await this.widget).getTreeWidget();
|
||||
const treeWidget = (await this.widget).getTreeWidget();
|
||||
const { model } = treeWidget;
|
||||
const node = await model.revealFile(resourceUri);
|
||||
if (SelectableTreeNode.is(node)) {
|
||||
model.selectNode(node);
|
||||
|
||||
Reference in New Issue
Block a user