@theia/property-view 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.
- package/README.md +44 -44
- package/package.json +4 -4
- package/src/browser/empty-property-view-widget-provider.tsx +83 -83
- package/src/browser/property-data-service.ts +48 -48
- package/src/browser/property-view-content-widget.ts +27 -27
- package/src/browser/property-view-contribution.ts +36 -36
- package/src/browser/property-view-frontend-module.ts +47 -47
- package/src/browser/property-view-service.ts +62 -62
- package/src/browser/property-view-widget-provider.ts +112 -112
- package/src/browser/property-view-widget.tsx +118 -118
- package/src/browser/resource-property-view/index.ts +17 -17
- package/src/browser/resource-property-view/resource-property-data-service.spec.ts +127 -127
- package/src/browser/resource-property-view/resource-property-data-service.ts +64 -64
- package/src/browser/resource-property-view/resource-property-view-label-provider.spec.ts +153 -153
- package/src/browser/resource-property-view/resource-property-view-label-provider.ts +49 -49
- package/src/browser/resource-property-view/resource-property-view-tree-container.ts +47 -47
- package/src/browser/resource-property-view/resource-property-view-tree-items.ts +53 -53
- package/src/browser/resource-property-view/resource-property-view-tree-widget.tsx +219 -219
- package/src/browser/resource-property-view/resource-property-view-widget-provider.ts +55 -55
- package/src/browser/style/property-view.css +51 -51
- package/src/package.spec.ts +29 -29
package/README.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<div align='center'>
|
|
2
|
-
|
|
3
|
-
<br />
|
|
4
|
-
|
|
5
|
-
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
-
|
|
7
|
-
<h2>ECLIPSE THEIA - PROPERTY-VIEW EXTENSION</h2>
|
|
8
|
-
|
|
9
|
-
<hr />
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
## Description
|
|
14
|
-
|
|
15
|
-
The `@theia/property-view` extension contributes a generic, global property view based on Theia's global selection.
|
|
16
|
-
|
|
17
|
-
The property view widget can be opened/toggled either via menu _View->Properties_ or via shortcut <kbd>Shift+Alt+P</kbd>. It is located in the bottom dock area by default.
|
|
18
|
-
|
|
19
|
-
The following two default content widgets are implemented in this extension:
|
|
20
|
-
- EmptyPropertyViewWidget: If no other widget can be provided, a simple message (_No properties available_) is shown.
|
|
21
|
-
- ResourcePropertyViewWidget: Can handle `FileSelection`s and `Navigatable` selections (which provide their resource URI) and displays the general `FileStat` information (e.g. location, name, last modified) in a TreeWidget.
|
|
22
|
-
|
|
23
|
-
To contribute a specific property view, it is necessary to implement a `PropertyViewDataService` which gathers the property data for a selection as well as a `PropertyViewWidgetProvider` which provides a suitable content widget to display the property data for a specific selection inside the property view widget.
|
|
24
|
-
|
|
25
|
-
</br>
|
|
26
|
-
|
|
27
|
-
## Additional Information
|
|
28
|
-
|
|
29
|
-
- [API documentation for `@theia/property-view`](https://eclipse-theia.github.io/theia/docs/next/modules/property_view.html)
|
|
30
|
-
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
31
|
-
- [Theia - Website](https://theia-ide.org/)
|
|
32
|
-
|
|
33
|
-
## License
|
|
34
|
-
|
|
35
|
-
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
36
|
-
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
37
|
-
|
|
38
|
-
## Trademark
|
|
39
|
-
"Theia" is a trademark of the Eclipse Foundation
|
|
40
|
-
https://www.eclipse.org/theia
|
|
41
|
-
|
|
42
|
-
## License
|
|
43
|
-
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
44
|
-
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
+
|
|
7
|
+
<h2>ECLIPSE THEIA - PROPERTY-VIEW EXTENSION</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
The `@theia/property-view` extension contributes a generic, global property view based on Theia's global selection.
|
|
16
|
+
|
|
17
|
+
The property view widget can be opened/toggled either via menu _View->Properties_ or via shortcut <kbd>Shift+Alt+P</kbd>. It is located in the bottom dock area by default.
|
|
18
|
+
|
|
19
|
+
The following two default content widgets are implemented in this extension:
|
|
20
|
+
- EmptyPropertyViewWidget: If no other widget can be provided, a simple message (_No properties available_) is shown.
|
|
21
|
+
- ResourcePropertyViewWidget: Can handle `FileSelection`s and `Navigatable` selections (which provide their resource URI) and displays the general `FileStat` information (e.g. location, name, last modified) in a TreeWidget.
|
|
22
|
+
|
|
23
|
+
To contribute a specific property view, it is necessary to implement a `PropertyViewDataService` which gathers the property data for a selection as well as a `PropertyViewWidgetProvider` which provides a suitable content widget to display the property data for a specific selection inside the property view widget.
|
|
24
|
+
|
|
25
|
+
</br>
|
|
26
|
+
|
|
27
|
+
## Additional Information
|
|
28
|
+
|
|
29
|
+
- [API documentation for `@theia/property-view`](https://eclipse-theia.github.io/theia/docs/next/modules/property_view.html)
|
|
30
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
31
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
36
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
37
|
+
|
|
38
|
+
## Trademark
|
|
39
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
40
|
+
https://www.eclipse.org/theia
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
44
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/property-view",
|
|
3
|
-
"version": "1.53.0-next.
|
|
3
|
+
"version": "1.53.0-next.64+23b351d26",
|
|
4
4
|
"description": "Theia - Property View Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.53.0-next.
|
|
7
|
-
"@theia/filesystem": "1.53.0-next.
|
|
6
|
+
"@theia/core": "1.53.0-next.64+23b351d26",
|
|
7
|
+
"@theia/filesystem": "1.53.0-next.64+23b351d26",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"nyc": {
|
|
46
46
|
"extends": "../../configs/nyc.json"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "23b351d26346a2b5d6aca3ee81fba59c056132f7"
|
|
49
49
|
}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 EclipseSource 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 { nls } from '@theia/core/lib/common/nls';
|
|
18
|
-
import { ReactWidget } from '@theia/core/lib/browser';
|
|
19
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
20
|
-
import * as React from '@theia/core/shared/react';
|
|
21
|
-
import { PropertyViewContentWidget } from './property-view-content-widget';
|
|
22
|
-
import { DefaultPropertyViewWidgetProvider } from './property-view-widget-provider';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Property view widget that is shown if no property data or selection is available.
|
|
26
|
-
* This widget is provided by the {@link EmptyPropertyViewWidgetProvider}.
|
|
27
|
-
*/
|
|
28
|
-
class EmptyPropertyViewWidget extends ReactWidget implements PropertyViewContentWidget {
|
|
29
|
-
|
|
30
|
-
static readonly ID = 'theia-empty-property-view';
|
|
31
|
-
static readonly LABEL = 'No Properties';
|
|
32
|
-
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.id = EmptyPropertyViewWidget.ID;
|
|
36
|
-
this.title.label = EmptyPropertyViewWidget.LABEL;
|
|
37
|
-
this.title.caption = EmptyPropertyViewWidget.LABEL;
|
|
38
|
-
this.title.closable = false;
|
|
39
|
-
this.node.tabIndex = 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
updatePropertyViewContent(): void {
|
|
43
|
-
this.update();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
protected render(): React.ReactNode {
|
|
47
|
-
return this.emptyComponent;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
protected emptyComponent: JSX.Element = <div className={'theia-widget-noInfo'}>{nls.localize('theia/property-view/noProperties', 'No properties available.')}</div>;
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* `EmptyPropertyViewWidgetProvider` is implemented to provide the {@link EmptyPropertyViewWidget}
|
|
56
|
-
* if the given selection is undefined or no other provider can handle the given selection.
|
|
57
|
-
*/
|
|
58
|
-
@injectable()
|
|
59
|
-
export class EmptyPropertyViewWidgetProvider extends DefaultPropertyViewWidgetProvider {
|
|
60
|
-
|
|
61
|
-
static readonly ID = 'no-properties';
|
|
62
|
-
override readonly id = EmptyPropertyViewWidgetProvider.ID;
|
|
63
|
-
override readonly label = 'DefaultPropertyViewWidgetProvider';
|
|
64
|
-
|
|
65
|
-
private emptyWidget: EmptyPropertyViewWidget;
|
|
66
|
-
|
|
67
|
-
constructor() {
|
|
68
|
-
super();
|
|
69
|
-
this.emptyWidget = new EmptyPropertyViewWidget();
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
override canHandle(selection: Object | undefined): number {
|
|
73
|
-
return selection === undefined ? 1 : 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
override provideWidget(selection: Object | undefined): Promise<EmptyPropertyViewWidget> {
|
|
77
|
-
return Promise.resolve(this.emptyWidget);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
override updateContentWidget(selection: Object | undefined): void {
|
|
81
|
-
this.emptyWidget.updatePropertyViewContent();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 EclipseSource 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 { nls } from '@theia/core/lib/common/nls';
|
|
18
|
+
import { ReactWidget } from '@theia/core/lib/browser';
|
|
19
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
20
|
+
import * as React from '@theia/core/shared/react';
|
|
21
|
+
import { PropertyViewContentWidget } from './property-view-content-widget';
|
|
22
|
+
import { DefaultPropertyViewWidgetProvider } from './property-view-widget-provider';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Property view widget that is shown if no property data or selection is available.
|
|
26
|
+
* This widget is provided by the {@link EmptyPropertyViewWidgetProvider}.
|
|
27
|
+
*/
|
|
28
|
+
class EmptyPropertyViewWidget extends ReactWidget implements PropertyViewContentWidget {
|
|
29
|
+
|
|
30
|
+
static readonly ID = 'theia-empty-property-view';
|
|
31
|
+
static readonly LABEL = 'No Properties';
|
|
32
|
+
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
this.id = EmptyPropertyViewWidget.ID;
|
|
36
|
+
this.title.label = EmptyPropertyViewWidget.LABEL;
|
|
37
|
+
this.title.caption = EmptyPropertyViewWidget.LABEL;
|
|
38
|
+
this.title.closable = false;
|
|
39
|
+
this.node.tabIndex = 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
updatePropertyViewContent(): void {
|
|
43
|
+
this.update();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected render(): React.ReactNode {
|
|
47
|
+
return this.emptyComponent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
protected emptyComponent: JSX.Element = <div className={'theia-widget-noInfo'}>{nls.localize('theia/property-view/noProperties', 'No properties available.')}</div>;
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* `EmptyPropertyViewWidgetProvider` is implemented to provide the {@link EmptyPropertyViewWidget}
|
|
56
|
+
* if the given selection is undefined or no other provider can handle the given selection.
|
|
57
|
+
*/
|
|
58
|
+
@injectable()
|
|
59
|
+
export class EmptyPropertyViewWidgetProvider extends DefaultPropertyViewWidgetProvider {
|
|
60
|
+
|
|
61
|
+
static readonly ID = 'no-properties';
|
|
62
|
+
override readonly id = EmptyPropertyViewWidgetProvider.ID;
|
|
63
|
+
override readonly label = 'DefaultPropertyViewWidgetProvider';
|
|
64
|
+
|
|
65
|
+
private emptyWidget: EmptyPropertyViewWidget;
|
|
66
|
+
|
|
67
|
+
constructor() {
|
|
68
|
+
super();
|
|
69
|
+
this.emptyWidget = new EmptyPropertyViewWidget();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
override canHandle(selection: Object | undefined): number {
|
|
73
|
+
return selection === undefined ? 1 : 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
override provideWidget(selection: Object | undefined): Promise<EmptyPropertyViewWidget> {
|
|
77
|
+
return Promise.resolve(this.emptyWidget);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
override updateContentWidget(selection: Object | undefined): void {
|
|
81
|
+
this.emptyWidget.updatePropertyViewContent();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 EclipseSource 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
|
-
export const PropertyDataService = Symbol('PropertyDataService');
|
|
18
|
-
/**
|
|
19
|
-
* `PropertyDataService` should be implemented to provide property data for the given selection.
|
|
20
|
-
*/
|
|
21
|
-
export interface PropertyDataService {
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A unique id for this provider.
|
|
25
|
-
*/
|
|
26
|
-
readonly id: string;
|
|
27
|
-
/**
|
|
28
|
-
* A human-readable name for this provider.
|
|
29
|
-
*/
|
|
30
|
-
readonly label?: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Test whether this provider can provide property data for the given selection.
|
|
34
|
-
* Return a nonzero number if this provider can provide; otherwise it cannot.
|
|
35
|
-
* Never reject.
|
|
36
|
-
*
|
|
37
|
-
* A returned value indicating a priority of this provider.
|
|
38
|
-
*/
|
|
39
|
-
canHandleSelection(selection: Object | undefined): number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Provide property data for the given selection.
|
|
43
|
-
* Resolve to a property view content widget.
|
|
44
|
-
* Never reject if `canHandle` returns a positive number; otherwise should reject.
|
|
45
|
-
*/
|
|
46
|
-
providePropertyData(selection: Object | undefined): Promise<Object | undefined>;
|
|
47
|
-
|
|
48
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 EclipseSource 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
|
+
export const PropertyDataService = Symbol('PropertyDataService');
|
|
18
|
+
/**
|
|
19
|
+
* `PropertyDataService` should be implemented to provide property data for the given selection.
|
|
20
|
+
*/
|
|
21
|
+
export interface PropertyDataService {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A unique id for this provider.
|
|
25
|
+
*/
|
|
26
|
+
readonly id: string;
|
|
27
|
+
/**
|
|
28
|
+
* A human-readable name for this provider.
|
|
29
|
+
*/
|
|
30
|
+
readonly label?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Test whether this provider can provide property data for the given selection.
|
|
34
|
+
* Return a nonzero number if this provider can provide; otherwise it cannot.
|
|
35
|
+
* Never reject.
|
|
36
|
+
*
|
|
37
|
+
* A returned value indicating a priority of this provider.
|
|
38
|
+
*/
|
|
39
|
+
canHandleSelection(selection: Object | undefined): number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Provide property data for the given selection.
|
|
43
|
+
* Resolve to a property view content widget.
|
|
44
|
+
* Never reject if `canHandle` returns a positive number; otherwise should reject.
|
|
45
|
+
*/
|
|
46
|
+
providePropertyData(selection: Object | undefined): Promise<Object | undefined>;
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 EclipseSource 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 { Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
18
|
-
import { PropertyDataService } from './property-data-service';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A widget that fetches the property data via the given {@link PropertyDataService} and the given selection
|
|
22
|
-
* and renders that property data.
|
|
23
|
-
* This widget can be provided by a registered `PropertyViewWidgetProvider`.
|
|
24
|
-
*/
|
|
25
|
-
export interface PropertyViewContentWidget extends Widget {
|
|
26
|
-
updatePropertyViewContent(propertyDataService?: PropertyDataService, selection?: Object): void;
|
|
27
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 EclipseSource 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 { Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
18
|
+
import { PropertyDataService } from './property-data-service';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A widget that fetches the property data via the given {@link PropertyDataService} and the given selection
|
|
22
|
+
* and renders that property data.
|
|
23
|
+
* This widget can be provided by a registered `PropertyViewWidgetProvider`.
|
|
24
|
+
*/
|
|
25
|
+
export interface PropertyViewContentWidget extends Widget {
|
|
26
|
+
updatePropertyViewContent(propertyDataService?: PropertyDataService, selection?: Object): void;
|
|
27
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 EclipseSource 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 { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
|
18
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { PropertyViewWidget } from './property-view-widget';
|
|
20
|
-
|
|
21
|
-
@injectable()
|
|
22
|
-
export class PropertyViewContribution extends AbstractViewContribution<PropertyViewWidget> {
|
|
23
|
-
|
|
24
|
-
constructor() {
|
|
25
|
-
super({
|
|
26
|
-
widgetId: PropertyViewWidget.ID,
|
|
27
|
-
widgetName: PropertyViewWidget.LABEL,
|
|
28
|
-
defaultWidgetOptions: {
|
|
29
|
-
area: 'bottom'
|
|
30
|
-
},
|
|
31
|
-
toggleCommandId: 'property-view:toggle',
|
|
32
|
-
toggleKeybinding: 'shift+alt+p'
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 EclipseSource 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 { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
|
18
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { PropertyViewWidget } from './property-view-widget';
|
|
20
|
+
|
|
21
|
+
@injectable()
|
|
22
|
+
export class PropertyViewContribution extends AbstractViewContribution<PropertyViewWidget> {
|
|
23
|
+
|
|
24
|
+
constructor() {
|
|
25
|
+
super({
|
|
26
|
+
widgetId: PropertyViewWidget.ID,
|
|
27
|
+
widgetName: PropertyViewWidget.LABEL,
|
|
28
|
+
defaultWidgetOptions: {
|
|
29
|
+
area: 'bottom'
|
|
30
|
+
},
|
|
31
|
+
toggleCommandId: 'property-view:toggle',
|
|
32
|
+
toggleKeybinding: 'shift+alt+p'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 EclipseSource 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 { bindViewContribution, WidgetFactory } from '@theia/core/lib/browser';
|
|
18
|
-
import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
19
|
-
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
20
|
-
import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider';
|
|
21
|
-
import { PropertyDataService } from './property-data-service';
|
|
22
|
-
import { PropertyViewContribution } from './property-view-contribution';
|
|
23
|
-
import { PropertyViewService } from './property-view-service';
|
|
24
|
-
import { PropertyViewWidget } from './property-view-widget';
|
|
25
|
-
import { PropertyViewWidgetProvider } from './property-view-widget-provider';
|
|
26
|
-
import { bindResourcePropertyView } from './resource-property-view';
|
|
27
|
-
import '../../src/browser/style/property-view.css';
|
|
28
|
-
|
|
29
|
-
export default new ContainerModule(bind => {
|
|
30
|
-
bind(PropertyViewService).toSelf().inSingletonScope();
|
|
31
|
-
|
|
32
|
-
bindContributionProvider(bind, PropertyDataService);
|
|
33
|
-
bindContributionProvider(bind, PropertyViewWidgetProvider);
|
|
34
|
-
|
|
35
|
-
bind(EmptyPropertyViewWidgetProvider).toSelf().inSingletonScope();
|
|
36
|
-
bind(PropertyViewWidgetProvider).to(EmptyPropertyViewWidgetProvider);
|
|
37
|
-
|
|
38
|
-
bind(PropertyViewWidget).toSelf();
|
|
39
|
-
bind(WidgetFactory).toDynamicValue(({ container }) => ({
|
|
40
|
-
id: PropertyViewWidget.ID,
|
|
41
|
-
createWidget: () => container.get(PropertyViewWidget)
|
|
42
|
-
})).inSingletonScope();
|
|
43
|
-
|
|
44
|
-
bindViewContribution(bind, PropertyViewContribution);
|
|
45
|
-
|
|
46
|
-
bindResourcePropertyView(bind);
|
|
47
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 EclipseSource 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 { bindViewContribution, WidgetFactory } from '@theia/core/lib/browser';
|
|
18
|
+
import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
19
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
20
|
+
import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider';
|
|
21
|
+
import { PropertyDataService } from './property-data-service';
|
|
22
|
+
import { PropertyViewContribution } from './property-view-contribution';
|
|
23
|
+
import { PropertyViewService } from './property-view-service';
|
|
24
|
+
import { PropertyViewWidget } from './property-view-widget';
|
|
25
|
+
import { PropertyViewWidgetProvider } from './property-view-widget-provider';
|
|
26
|
+
import { bindResourcePropertyView } from './resource-property-view';
|
|
27
|
+
import '../../src/browser/style/property-view.css';
|
|
28
|
+
|
|
29
|
+
export default new ContainerModule(bind => {
|
|
30
|
+
bind(PropertyViewService).toSelf().inSingletonScope();
|
|
31
|
+
|
|
32
|
+
bindContributionProvider(bind, PropertyDataService);
|
|
33
|
+
bindContributionProvider(bind, PropertyViewWidgetProvider);
|
|
34
|
+
|
|
35
|
+
bind(EmptyPropertyViewWidgetProvider).toSelf().inSingletonScope();
|
|
36
|
+
bind(PropertyViewWidgetProvider).to(EmptyPropertyViewWidgetProvider);
|
|
37
|
+
|
|
38
|
+
bind(PropertyViewWidget).toSelf();
|
|
39
|
+
bind(WidgetFactory).toDynamicValue(({ container }) => ({
|
|
40
|
+
id: PropertyViewWidget.ID,
|
|
41
|
+
createWidget: () => container.get(PropertyViewWidget)
|
|
42
|
+
})).inSingletonScope();
|
|
43
|
+
|
|
44
|
+
bindViewContribution(bind, PropertyViewContribution);
|
|
45
|
+
|
|
46
|
+
bindResourcePropertyView(bind);
|
|
47
|
+
});
|