Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 585a82b

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Added logging when restoring the layout data.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 5edccb9 commit 585a82b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎arduino-ide-extension/src/browser/theia/core/shell-layout-restorer.ts‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@ import { ShellLayoutRestorer as TheiaShellLayoutRestorer } from '@theia/core/lib
44
import { injectable } from '@theia/core/shared/inversify';
55
import { EditorPreviewWidgetFactory } from '@theia/editor-preview/lib/browser/editor-preview-widget-factory';
66
import { EditorWidgetFactory } from '@theia/editor/lib/browser/editor-widget-factory';
7+
import { FrontendApplication } from './frontend-application';
78

89
@injectable()
910
export class ShellLayoutRestorer extends TheiaShellLayoutRestorer {
11+
override async restoreLayout(app: FrontendApplication): Promise<boolean> {
12+
this.logger.info('>>> Restoring the layout state...');
13+
const serializedLayoutData = await this.storageService.getData<string>(
14+
this.storageKey
15+
);
16+
if (serializedLayoutData === undefined) {
17+
this.logger.info('<<< Nothing to restore.');
18+
return false;
19+
}
20+
console.log('------- SERIALIZED LAYOUT DATA -------');
21+
console.log(serializedLayoutData);
22+
console.log('------- END SERIALIZED LAYOUT DATA -------');
23+
const layoutData = await this.inflate(serializedLayoutData);
24+
await app.shell.setLayoutData(layoutData);
25+
this.logger.info('<<< The layout has been successfully restored.');
26+
return true;
27+
}
28+
1029
/**
1130
* Customized to filter out duplicate editor tabs.
1231
*/

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /