Aligned the electron app to the latest Theia APIs.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-09-18 12:23:52 +02:00
committed by Akos Kitta
parent def93ea32f
commit e755a1cd7e
11 changed files with 123 additions and 329 deletions

View File

@@ -1,5 +1,6 @@
import { injectable } from 'inversify';
import { remote } from 'electron';
import URI from '@theia/core/lib/common/uri';
import { ArduinoMenus } from '../menu/arduino-menus';
import { SketchContribution, Command, CommandRegistry, MenuModelRegistry, KeybindingRegistry } from './contribution';
@@ -30,9 +31,9 @@ export class OpenSketchExternal extends SketchContribution {
protected async openExternal(): Promise<void> {
const uri = await this.sketchServiceClient.currentSketchFile();
if (uri) {
const exists = this.fileSystem.exists(uri);
const exists = this.fileService.exists(new URI(uri));
if (exists) {
const fsPath = await this.fileSystem.getFsPath(uri);
const fsPath = await this.fileService.fsPath(new URI(uri));
if (fsPath) {
remote.shell.showItemInFolder(fsPath);
}