mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 02:18:32 +00:00
[ATL-1599] [ATL-1416] Upgrade Theia to 1.18.0 (#489)
Co-authored-by: Alberto Iannaccone <a.iannaccone@arduino.cc>
This commit is contained in:
committed by
Francesco Stasi
parent
54a67fc67c
commit
fc0f67493b
@@ -258,7 +258,10 @@ export class SketchbookTreeModel extends FileTreeModel {
|
||||
}
|
||||
|
||||
public open(uri: URI): void {
|
||||
open(this.openerService, uri);
|
||||
open(this.openerService, uri, {
|
||||
mode: 'reveal',
|
||||
preview: false,
|
||||
});
|
||||
}
|
||||
|
||||
protected async doOpenNode(node: TreeNode): Promise<void> {
|
||||
|
||||
@@ -84,7 +84,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{super.renderTailDecorations(node, props)}
|
||||
{this.renderInlineCommands(node, props)}
|
||||
{this.renderInlineCommands(node)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
@@ -107,15 +107,8 @@ export class SketchbookTreeWidget extends FileTreeWidget {
|
||||
};
|
||||
}
|
||||
|
||||
protected renderInlineCommands(
|
||||
node: TreeNode,
|
||||
props: NodeProps
|
||||
): React.ReactNode {
|
||||
if (
|
||||
SketchbookTree.SketchDirNode.is(node) &&
|
||||
((node.commands && node.id === this.hoveredNodeId) ||
|
||||
this.currentSketchUri === node?.uri.toString())
|
||||
) {
|
||||
protected renderInlineCommands(node: TreeNode): React.ReactNode {
|
||||
if (SketchbookTree.SketchDirNode.is(node) && node.commands) {
|
||||
return Array.from(new Set(node.commands)).map((command) =>
|
||||
this.renderInlineCommand(command.id, node)
|
||||
);
|
||||
@@ -142,6 +135,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
|
||||
TREE_NODE_TAIL_CLASS,
|
||||
icon,
|
||||
'theia-tree-view-inline-action',
|
||||
'sketchbook-commands-icons',
|
||||
].join(' ');
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -179,7 +179,7 @@ export class SketchbookWidgetContribution
|
||||
x: container.getBoundingClientRect().left,
|
||||
y: container.getBoundingClientRect().top + container.offsetHeight,
|
||||
},
|
||||
args: arg,
|
||||
args: [arg],
|
||||
};
|
||||
this.contextMenuRenderer.render(options);
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ export class SketchbookWidget extends BaseWidget {
|
||||
this.id = 'arduino-sketchbook-widget';
|
||||
this.title.caption = 'Sketchbook';
|
||||
this.title.label = 'Sketchbook';
|
||||
this.title.iconClass = 'sketchbook-tab-icon';
|
||||
this.title.iconClass = 'fa fa-arduino-folder';
|
||||
this.title.closable = true;
|
||||
this.node.tabIndex = 0;
|
||||
this.sketchbookTreesContainer = this.createTreesContainer();
|
||||
|
||||
Reference in New Issue
Block a user