@theia/search-in-workspace 1.53.0-next.55 → 1.53.0-next.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,53 +1,53 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2021 SAP SE or an SAP affiliate company and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { injectable } from '@theia/core/shared/inversify';
18
- import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer';
19
- import { SearchInWorkspaceWidget } from './search-in-workspace-widget';
20
- import { SEARCH_VIEW_CONTAINER_ID, SEARCH_VIEW_CONTAINER_TITLE_OPTIONS } from './search-in-workspace-factory';
21
-
22
- @injectable()
23
- export class SearchLayoutVersion3Migration implements ApplicationShellLayoutMigration {
24
- readonly layoutVersion = 6.0;
25
- onWillInflateWidget(desc: WidgetDescription, { parent }: ApplicationShellLayoutMigrationContext): WidgetDescription | undefined {
26
- if (desc.constructionOptions.factoryId === SearchInWorkspaceWidget.ID && !parent) {
27
- return {
28
- constructionOptions: {
29
- factoryId: SEARCH_VIEW_CONTAINER_ID
30
- },
31
- innerWidgetState: {
32
- parts: [
33
- {
34
- widget: {
35
- constructionOptions: {
36
- factoryId: SearchInWorkspaceWidget.ID
37
- },
38
- innerWidgetState: desc.innerWidgetState
39
- },
40
- partId: {
41
- factoryId: SearchInWorkspaceWidget.ID
42
- },
43
- collapsed: false,
44
- hidden: false
45
- }
46
- ],
47
- title: SEARCH_VIEW_CONTAINER_TITLE_OPTIONS
48
- }
49
- };
50
- }
51
- return undefined;
52
- }
53
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2021 SAP SE or an SAP affiliate company and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { injectable } from '@theia/core/shared/inversify';
18
+ import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer';
19
+ import { SearchInWorkspaceWidget } from './search-in-workspace-widget';
20
+ import { SEARCH_VIEW_CONTAINER_ID, SEARCH_VIEW_CONTAINER_TITLE_OPTIONS } from './search-in-workspace-factory';
21
+
22
+ @injectable()
23
+ export class SearchLayoutVersion3Migration implements ApplicationShellLayoutMigration {
24
+ readonly layoutVersion = 6.0;
25
+ onWillInflateWidget(desc: WidgetDescription, { parent }: ApplicationShellLayoutMigrationContext): WidgetDescription | undefined {
26
+ if (desc.constructionOptions.factoryId === SearchInWorkspaceWidget.ID && !parent) {
27
+ return {
28
+ constructionOptions: {
29
+ factoryId: SEARCH_VIEW_CONTAINER_ID
30
+ },
31
+ innerWidgetState: {
32
+ parts: [
33
+ {
34
+ widget: {
35
+ constructionOptions: {
36
+ factoryId: SearchInWorkspaceWidget.ID
37
+ },
38
+ innerWidgetState: desc.innerWidgetState
39
+ },
40
+ partId: {
41
+ factoryId: SearchInWorkspaceWidget.ID
42
+ },
43
+ collapsed: false,
44
+ hidden: false
45
+ }
46
+ ],
47
+ title: SEARCH_VIEW_CONTAINER_TITLE_OPTIONS
48
+ }
49
+ };
50
+ }
51
+ return undefined;
52
+ }
53
+ }