From b4848f62fa9a1c93d5c29838151c76297be1c889 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Fri, 22 Nov 2019 14:07:40 +0100 Subject: [PATCH] Corrected the docs. Signed-off-by: Akos Kitta --- arduino-ide-extension/src/browser/editor-mode.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arduino-ide-extension/src/browser/editor-mode.ts b/arduino-ide-extension/src/browser/editor-mode.ts index 2a3b0a7e..872b4648 100644 --- a/arduino-ide-extension/src/browser/editor-mode.ts +++ b/arduino-ide-extension/src/browser/editor-mode.ts @@ -33,11 +33,9 @@ export class EditorMode implements FrontendApplicationContribution { shell.closeTabs(area, ({ owner }) => !(owner instanceof EditorWidget || owner instanceof OutputWidget)); } } - // No `else`. We initialize the views (if required) in `this.onStart`. - // `storeLayout` is not invoked in electron when refreshing the browser window: https://github.com/eclipse-theia/theia/issues/6530 - // We store the state manually. - // XXX: hack instead of injecting the `ArduinoShellLayoutRestorer` we have to retrieve it from the - // application to avoid DI cycle. + // `storeLayout` has a sync API but the implementation is async, we store the layout manually before we reload the page. + // See: https://github.com/eclipse-theia/theia/issues/6579 + // XXX: hack instead of injecting the `ArduinoShellLayoutRestorer` we have to retrieve it from the application to avoid DI cycle. const layoutRestorer = (this.app as any).layoutRestorer as ArduinoShellLayoutRestorer await layoutRestorer.storeLayoutAsync(this.app); window.location.reload(true);