[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:
Francesco Stasi
2021-10-06 10:05:30 +02:00
committed by Francesco Stasi
parent 54a67fc67c
commit fc0f67493b
47 changed files with 1372 additions and 21707 deletions

View File

@@ -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> {

View File

@@ -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

View File

@@ -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);
},

View File

@@ -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();