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

Appearance settings

Commit 16e4623

Browse filesBrowse files
author
Akos Kitta
committed
Added logging when restoring the layout data.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 5505c01 commit 16e4623
Copy full SHA for 16e4623

File tree

Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/theia/core/shell-layout-restorer.ts
+19Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.