@theia/property-view 1.77.0-next.99 → 1.78.0-next.0
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/lib/browser/empty-property-view-widget-provider.d.ts +2 -2
- package/lib/browser/empty-property-view-widget-provider.d.ts.map +1 -1
- package/lib/browser/empty-property-view-widget-provider.js +12 -16
- package/lib/browser/empty-property-view-widget-provider.js.map +1 -1
- package/lib/browser/property-data-service.js +1 -4
- package/lib/browser/property-data-service.js.map +1 -1
- package/lib/browser/property-view-content-widget.d.ts +1 -1
- package/lib/browser/property-view-content-widget.d.ts.map +1 -1
- package/lib/browser/property-view-content-widget.js +1 -2
- package/lib/browser/property-view-content-widget.js.map +1 -1
- package/lib/browser/property-view-contribution.d.ts +1 -1
- package/lib/browser/property-view-contribution.d.ts.map +1 -1
- package/lib/browser/property-view-contribution.js +10 -14
- package/lib/browser/property-view-contribution.js.map +1 -1
- package/lib/browser/property-view-frontend-module.js +23 -25
- package/lib/browser/property-view-frontend-module.js.map +1 -1
- package/lib/browser/property-view-service.d.ts +1 -1
- package/lib/browser/property-view-service.d.ts.map +1 -1
- package/lib/browser/property-view-service.js +16 -24
- package/lib/browser/property-view-service.js.map +1 -1
- package/lib/browser/property-view-widget-provider.d.ts +2 -2
- package/lib/browser/property-view-widget-provider.d.ts.map +1 -1
- package/lib/browser/property-view-widget-provider.js +14 -21
- package/lib/browser/property-view-widget-provider.js.map +1 -1
- package/lib/browser/property-view-widget.d.ts +2 -2
- package/lib/browser/property-view-widget.d.ts.map +1 -1
- package/lib/browser/property-view-widget.js +27 -35
- package/lib/browser/property-view-widget.js.map +1 -1
- package/lib/browser/resource-property-view/index.d.ts +1 -1
- package/lib/browser/resource-property-view/index.d.ts.map +1 -1
- package/lib/browser/resource-property-view/index.js +1 -4
- package/lib/browser/resource-property-view/index.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-data-service.d.ts +1 -1
- package/lib/browser/resource-property-view/resource-property-data-service.d.ts.map +1 -1
- package/lib/browser/resource-property-view/resource-property-data-service.js +12 -16
- package/lib/browser/resource-property-view/resource-property-data-service.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-data-service.spec.js +28 -31
- package/lib/browser/resource-property-view/resource-property-data-service.spec.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-label-provider.d.ts +1 -1
- package/lib/browser/resource-property-view/resource-property-view-label-provider.d.ts.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-label-provider.js +14 -18
- package/lib/browser/resource-property-view/resource-property-view-label-provider.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-label-provider.spec.js +27 -29
- package/lib/browser/resource-property-view/resource-property-view-label-provider.spec.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-tree-container.js +15 -18
- package/lib/browser/resource-property-view/resource-property-view-tree-container.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-tree-items.js +11 -14
- package/lib/browser/resource-property-view/resource-property-view-tree-items.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-tree-widget.d.ts +3 -3
- package/lib/browser/resource-property-view/resource-property-view-tree-widget.d.ts.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-tree-widget.js +35 -42
- package/lib/browser/resource-property-view/resource-property-view-tree-widget.js.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-widget-provider.d.ts +2 -2
- package/lib/browser/resource-property-view/resource-property-view-widget-provider.d.ts.map +1 -1
- package/lib/browser/resource-property-view/resource-property-view-widget-provider.js +14 -18
- package/lib/browser/resource-property-view/resource-property-view-widget-provider.js.map +1 -1
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.js +1 -1
- package/lib/package.spec.js.map +1 -1
- package/package.json +14 -5
- package/src/browser/empty-property-view-widget-provider.tsx +2 -2
- package/src/browser/property-view-content-widget.ts +1 -1
- package/src/browser/property-view-contribution.ts +1 -1
- package/src/browser/property-view-frontend-module.ts +7 -7
- package/src/browser/property-view-service.ts +2 -2
- package/src/browser/property-view-widget-provider.ts +2 -2
- package/src/browser/property-view-widget.tsx +2 -2
- package/src/browser/resource-property-view/index.ts +1 -1
- package/src/browser/resource-property-view/resource-property-data-service.spec.ts +2 -2
- package/src/browser/resource-property-view/resource-property-data-service.ts +1 -1
- package/src/browser/resource-property-view/resource-property-view-label-provider.spec.ts +2 -2
- package/src/browser/resource-property-view/resource-property-view-label-provider.ts +1 -1
- package/src/browser/resource-property-view/resource-property-view-tree-container.ts +6 -6
- package/src/browser/resource-property-view/resource-property-view-tree-widget.tsx +3 -3
- package/src/browser/resource-property-view/resource-property-view-widget-provider.ts +2 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,29 +13,27 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.ROOT_ID = 'ResourcePropertiesTree';
|
|
21
|
-
var ResourcePropertiesRoot;
|
|
16
|
+
import { CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode } from '@theia/core/lib/browser';
|
|
17
|
+
export const ROOT_ID = 'ResourcePropertiesTree';
|
|
18
|
+
export var ResourcePropertiesRoot;
|
|
22
19
|
(function (ResourcePropertiesRoot) {
|
|
23
20
|
function is(node) {
|
|
24
|
-
return
|
|
21
|
+
return CompositeTreeNode.is(node) && node.id === ROOT_ID;
|
|
25
22
|
}
|
|
26
23
|
ResourcePropertiesRoot.is = is;
|
|
27
|
-
})(ResourcePropertiesRoot || (
|
|
28
|
-
var ResourcePropertiesCategoryNode;
|
|
24
|
+
})(ResourcePropertiesRoot || (ResourcePropertiesRoot = {}));
|
|
25
|
+
export var ResourcePropertiesCategoryNode;
|
|
29
26
|
(function (ResourcePropertiesCategoryNode) {
|
|
30
27
|
function is(node) {
|
|
31
|
-
return
|
|
28
|
+
return ExpandableTreeNode.is(node) && SelectableTreeNode.is(node) && 'categoryId' in node;
|
|
32
29
|
}
|
|
33
30
|
ResourcePropertiesCategoryNode.is = is;
|
|
34
|
-
})(ResourcePropertiesCategoryNode || (
|
|
35
|
-
var ResourcePropertiesItemNode;
|
|
31
|
+
})(ResourcePropertiesCategoryNode || (ResourcePropertiesCategoryNode = {}));
|
|
32
|
+
export var ResourcePropertiesItemNode;
|
|
36
33
|
(function (ResourcePropertiesItemNode) {
|
|
37
34
|
function is(node) {
|
|
38
|
-
return !!node &&
|
|
35
|
+
return !!node && SelectableTreeNode.is(node) && 'property' in node;
|
|
39
36
|
}
|
|
40
37
|
ResourcePropertiesItemNode.is = is;
|
|
41
|
-
})(ResourcePropertiesItemNode || (
|
|
38
|
+
})(ResourcePropertiesItemNode || (ResourcePropertiesItemNode = {}));
|
|
42
39
|
//# sourceMappingURL=resource-property-view-tree-items.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-property-view-tree-items.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-tree-items.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resource-property-view-tree-items.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-tree-items.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAY,MAAM,yBAAyB,CAAC;AAE9G,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAKhD,MAAM,KAAW,sBAAsB,CAItC;AAJD,WAAiB,sBAAsB;IACnC,SAAgB,EAAE,CAAC,IAAa;QAC5B,OAAO,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,OAAO,CAAC;IAC7D,CAAC;IAFe,yBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,sBAAsB,KAAtB,sBAAsB,QAItC;AASD,MAAM,KAAW,8BAA8B,CAI9C;AAJD,WAAiB,8BAA8B;IAC3C,SAAgB,EAAE,CAAC,IAA0B;QACzC,OAAO,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,YAAY,IAAI,IAAI,CAAC;IAC9F,CAAC;IAFe,iCAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,8BAA8B,KAA9B,8BAA8B,QAI9C;AAQD,MAAM,KAAW,0BAA0B,CAI1C;AAJD,WAAiB,0BAA0B;IACvC,SAAgB,EAAE,CAAC,IAA0B;QACzC,OAAO,CAAC,CAAC,IAAI,IAAI,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,UAAU,IAAI,IAAI,CAAC;IACvE,CAAC;IAFe,6BAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,0BAA0B,KAA1B,0BAA0B,QAI1C"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextMenuRenderer, NodeProps, TreeModel, TreeNode, TreeProps, TreeWidget } from '@theia/core/lib/browser';
|
|
2
2
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
3
3
|
import * as React from '@theia/core/shared/react';
|
|
4
|
-
import { PropertyDataService } from '../property-data-service';
|
|
5
|
-
import { PropertyViewContentWidget } from '../property-view-content-widget';
|
|
6
|
-
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items';
|
|
4
|
+
import { PropertyDataService } from '../property-data-service.js';
|
|
5
|
+
import { PropertyViewContentWidget } from '../property-view-content-widget.js';
|
|
6
|
+
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items.js';
|
|
7
7
|
/**
|
|
8
8
|
* This widget fetches the property data for {@link FileSelection}s and selections of {@link Navigatable}s
|
|
9
9
|
* and renders that property data as a {@link TreeWidget}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-property-view-tree-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-tree-widget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACH,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resource-property-view-tree-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-tree-widget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACH,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EACH,8BAA8B,EAC9B,0BAA0B,EAG7B,MAAM,wCAAwC,CAAC;AAGhD;;;;GAIG;AACH,qBACa,8BAA+B,SAAQ,UAAW,YAAW,yBAAyB;IAE/F,MAAM,CAAC,QAAQ,CAAC,EAAE,qCAAqC;IACvD,MAAM,CAAC,QAAQ,CAAC,KAAK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,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,SAAS;IASnF,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,8BAA8B,GAAG,KAAK,CAAC,SAAS;IAOrF,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,0BAA0B,GAAG,KAAK,CAAC,SAAS;cAQxD,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAO/H,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS;CAS/D"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var ResourcePropertyViewTreeWidget_1;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
2
|
+
import { __decorate, __param } from "tslib";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@theia/core/shared/react/jsx-runtime";
|
|
7
4
|
// *****************************************************************************
|
|
8
5
|
// Copyright (C) 2020 EclipseSource and others.
|
|
9
6
|
//
|
|
@@ -19,24 +16,24 @@ const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
|
19
16
|
//
|
|
20
17
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
21
18
|
// *****************************************************************************
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
import { ContextMenuRenderer, TreeModel, TreeProps, TreeWidget } from '@theia/core/lib/browser';
|
|
20
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
21
|
+
import * as React from '@theia/core/shared/react';
|
|
22
|
+
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode, ResourcePropertiesRoot, ROOT_ID } from './resource-property-view-tree-items.js';
|
|
23
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
27
24
|
/**
|
|
28
25
|
* This widget fetches the property data for {@link FileSelection}s and selections of {@link Navigatable}s
|
|
29
26
|
* and renders that property data as a {@link TreeWidget}.
|
|
30
27
|
* This widget is provided by the registered `ResourcePropertyViewWidgetProvider`.
|
|
31
28
|
*/
|
|
32
|
-
let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extends
|
|
29
|
+
let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extends TreeWidget {
|
|
33
30
|
static { ResourcePropertyViewTreeWidget_1 = this; }
|
|
34
31
|
static { this.ID = 'resource-properties-tree-widget'; }
|
|
35
32
|
static { this.LABEL = 'Resource Properties Tree'; }
|
|
36
33
|
constructor(props, model, contextMenuRenderer) {
|
|
37
34
|
super(props, model, contextMenuRenderer);
|
|
38
35
|
model.root = {
|
|
39
|
-
id:
|
|
36
|
+
id: ROOT_ID,
|
|
40
37
|
name: ResourcePropertyViewTreeWidget_1.LABEL,
|
|
41
38
|
parent: undefined,
|
|
42
39
|
visible: false,
|
|
@@ -66,17 +63,17 @@ let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extend
|
|
|
66
63
|
fillPropertiesTree(fileStatObject) {
|
|
67
64
|
if (fileStatObject) {
|
|
68
65
|
this.propertiesTree.clear();
|
|
69
|
-
const infoNode = this.createCategoryNode('info',
|
|
66
|
+
const infoNode = this.createCategoryNode('info', nls.localizeByDefault('Info'));
|
|
70
67
|
this.propertiesTree.set('info', infoNode);
|
|
71
|
-
infoNode.children.push(this.createResultLineNode('isDirectory',
|
|
72
|
-
infoNode.children.push(this.createResultLineNode('isFile',
|
|
73
|
-
infoNode.children.push(this.createResultLineNode('isSymbolicLink',
|
|
74
|
-
infoNode.children.push(this.createResultLineNode('location',
|
|
75
|
-
infoNode.children.push(this.createResultLineNode('name',
|
|
76
|
-
infoNode.children.push(this.createResultLineNode('path',
|
|
77
|
-
infoNode.children.push(this.createResultLineNode('lastModification',
|
|
78
|
-
infoNode.children.push(this.createResultLineNode('created',
|
|
79
|
-
infoNode.children.push(this.createResultLineNode('size',
|
|
68
|
+
infoNode.children.push(this.createResultLineNode('isDirectory', nls.localizeByDefault('Directory'), fileStatObject.isDirectory, infoNode));
|
|
69
|
+
infoNode.children.push(this.createResultLineNode('isFile', nls.localizeByDefault('File'), fileStatObject.isFile, infoNode));
|
|
70
|
+
infoNode.children.push(this.createResultLineNode('isSymbolicLink', nls.localize('theia/property-view/symbolicLink', 'Symbolic link'), fileStatObject.isSymbolicLink, infoNode));
|
|
71
|
+
infoNode.children.push(this.createResultLineNode('location', nls.localizeByDefault('Location'), this.getLocationString(fileStatObject), infoNode));
|
|
72
|
+
infoNode.children.push(this.createResultLineNode('name', nls.localizeByDefault('Name'), this.getFileName(fileStatObject), infoNode));
|
|
73
|
+
infoNode.children.push(this.createResultLineNode('path', nls.localizeByDefault('Path'), this.getFilePath(fileStatObject), infoNode));
|
|
74
|
+
infoNode.children.push(this.createResultLineNode('lastModification', nls.localize('theia/property-view/lastModified', 'Last modified'), this.getLastModificationString(fileStatObject), infoNode));
|
|
75
|
+
infoNode.children.push(this.createResultLineNode('created', nls.localizeByDefault('Created'), this.getCreationTimeString(fileStatObject), infoNode));
|
|
76
|
+
infoNode.children.push(this.createResultLineNode('size', nls.localizeByDefault('Size'), this.getSizeString(fileStatObject), infoNode));
|
|
80
77
|
this.refreshModelChildren();
|
|
81
78
|
}
|
|
82
79
|
}
|
|
@@ -96,7 +93,7 @@ let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extend
|
|
|
96
93
|
return fileStat.ctime ? new Date(fileStat.ctime).toLocaleString() : '';
|
|
97
94
|
}
|
|
98
95
|
getSizeString(fileStat) {
|
|
99
|
-
return fileStat.size ?
|
|
96
|
+
return fileStat.size ? nls.localizeByDefault('{0}B', fileStat.size.toString()) : '';
|
|
100
97
|
}
|
|
101
98
|
/*
|
|
102
99
|
* Creating TreeNodes
|
|
@@ -125,25 +122,25 @@ let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extend
|
|
|
125
122
|
* Rendering
|
|
126
123
|
*/
|
|
127
124
|
async refreshModelChildren() {
|
|
128
|
-
if (
|
|
125
|
+
if (ResourcePropertiesRoot.is(this.model.root)) {
|
|
129
126
|
this.model.root.children = Array.from(this.propertiesTree.values());
|
|
130
127
|
this.model.refresh();
|
|
131
128
|
}
|
|
132
129
|
}
|
|
133
130
|
renderCaption(node, props) {
|
|
134
|
-
if (
|
|
131
|
+
if (ResourcePropertiesCategoryNode.is(node)) {
|
|
135
132
|
return this.renderExpandableNode(node);
|
|
136
133
|
}
|
|
137
|
-
else if (
|
|
134
|
+
else if (ResourcePropertiesItemNode.is(node)) {
|
|
138
135
|
return this.renderItemNode(node);
|
|
139
136
|
}
|
|
140
137
|
return undefined;
|
|
141
138
|
}
|
|
142
139
|
renderExpandableNode(node) {
|
|
143
|
-
return (
|
|
140
|
+
return _jsxs(React.Fragment, { children: [_jsx("div", { className: `theia-resource-tree-node-icon ${this.toNodeIcon(node)}` }), _jsx("div", { className: 'theia-resource-tree-node-name theia-TreeNodeSegment theia-TreeNodeSegmentGrow', children: this.toNodeName(node) })] });
|
|
144
141
|
}
|
|
145
142
|
renderItemNode(node) {
|
|
146
|
-
return (
|
|
143
|
+
return _jsxs(React.Fragment, { children: [_jsx("div", { className: `theia-resource-tree-node-icon ${this.toNodeIcon(node)}` }), _jsx("div", { className: 'theia-resource-tree-node-name theia-TreeNodeSegment theia-TreeNodeSegmentGrow', children: this.toNodeName(node) }), _jsx("div", { className: 'theia-resource-tree-node-property theia-TreeNodeSegment theia-TreeNodeSegmentGrow', children: this.toNodeDescription(node) })] });
|
|
147
144
|
}
|
|
148
145
|
createNodeAttributes(node, props) {
|
|
149
146
|
return {
|
|
@@ -152,27 +149,23 @@ let ResourcePropertyViewTreeWidget = class ResourcePropertyViewTreeWidget extend
|
|
|
152
149
|
};
|
|
153
150
|
}
|
|
154
151
|
getNodeTooltip(node) {
|
|
155
|
-
if (
|
|
152
|
+
if (ResourcePropertiesCategoryNode.is(node)) {
|
|
156
153
|
return this.labelProvider.getName(node);
|
|
157
154
|
}
|
|
158
|
-
else if (
|
|
155
|
+
else if (ResourcePropertiesItemNode.is(node)) {
|
|
159
156
|
return `${this.labelProvider.getName(node)}: ${this.labelProvider.getLongName(node)}`;
|
|
160
157
|
}
|
|
161
158
|
return undefined;
|
|
162
159
|
}
|
|
163
160
|
};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
(0, inversify_1.postConstruct)(),
|
|
167
|
-
tslib_1.__metadata("design:type", Function),
|
|
168
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
169
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
161
|
+
__decorate([
|
|
162
|
+
postConstruct()
|
|
170
163
|
], ResourcePropertyViewTreeWidget.prototype, "init", null);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, browser_1.ContextMenuRenderer])
|
|
164
|
+
ResourcePropertyViewTreeWidget = ResourcePropertyViewTreeWidget_1 = __decorate([
|
|
165
|
+
injectable(),
|
|
166
|
+
__param(0, inject(TreeProps)),
|
|
167
|
+
__param(1, inject(TreeModel)),
|
|
168
|
+
__param(2, inject(ContextMenuRenderer))
|
|
177
169
|
], ResourcePropertyViewTreeWidget);
|
|
170
|
+
export { ResourcePropertyViewTreeWidget };
|
|
178
171
|
//# sourceMappingURL=resource-property-view-tree-widget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-property-view-tree-widget.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-tree-widget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resource-property-view-tree-widget.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-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A;IACjB,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;GAXvB,8BAA8B,CA+K1C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultPropertyViewWidgetProvider } from '../property-view-widget-provider';
|
|
2
|
-
import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget';
|
|
1
|
+
import { DefaultPropertyViewWidgetProvider } from '../property-view-widget-provider.js';
|
|
2
|
+
import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget.js';
|
|
3
3
|
/**
|
|
4
4
|
* Provides the {@link ResourcePropertyViewTreeWidget} for
|
|
5
5
|
* {@link FileSelection}s and selections of {@link Navigatable}s.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-property-view-widget-provider.d.ts","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-widget-provider.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,iCAAiC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resource-property-view-widget-provider.d.ts","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-widget-provider.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF;;;GAGG;AACH,qBACa,kCAAmC,SAAQ,iCAAiC;IAE7C,SAAS,CAAC,UAAU,EAAE,8BAA8B,CAAC;IAE7F,SAAkB,EAAE,eAAe;IACnC,SAAkB,KAAK,wCAAwC;IAEtD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAIzD,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IAIjE,SAAS,CAAC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IAI/D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAIrF,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAIpE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,19 +13,17 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const property_view_widget_provider_1 = require("../property-view-widget-provider");
|
|
24
|
-
const resource_property_view_tree_widget_1 = require("./resource-property-view-tree-widget");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { Navigatable } from '@theia/core/lib/browser';
|
|
18
|
+
import { FileSelection } from '@theia/filesystem/lib/browser/file-selection';
|
|
19
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
20
|
+
import { DefaultPropertyViewWidgetProvider } from '../property-view-widget-provider.js';
|
|
21
|
+
import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget.js';
|
|
25
22
|
/**
|
|
26
23
|
* Provides the {@link ResourcePropertyViewTreeWidget} for
|
|
27
24
|
* {@link FileSelection}s and selections of {@link Navigatable}s.
|
|
28
25
|
*/
|
|
29
|
-
let ResourcePropertyViewWidgetProvider = class ResourcePropertyViewWidgetProvider extends
|
|
26
|
+
let ResourcePropertyViewWidgetProvider = class ResourcePropertyViewWidgetProvider extends DefaultPropertyViewWidgetProvider {
|
|
30
27
|
constructor() {
|
|
31
28
|
super(...arguments);
|
|
32
29
|
this.id = 'resources';
|
|
@@ -36,10 +33,10 @@ let ResourcePropertyViewWidgetProvider = class ResourcePropertyViewWidgetProvide
|
|
|
36
33
|
return (this.isFileSelection(selection) || this.isNavigatableSelection(selection)) ? 1 : 0;
|
|
37
34
|
}
|
|
38
35
|
isFileSelection(selection) {
|
|
39
|
-
return !!selection && Array.isArray(selection) &&
|
|
36
|
+
return !!selection && Array.isArray(selection) && FileSelection.is(selection[0]);
|
|
40
37
|
}
|
|
41
38
|
isNavigatableSelection(selection) {
|
|
42
|
-
return !!selection &&
|
|
39
|
+
return !!selection && Navigatable.is(selection);
|
|
43
40
|
}
|
|
44
41
|
provideWidget(selection) {
|
|
45
42
|
return Promise.resolve(this.treeWidget);
|
|
@@ -48,12 +45,11 @@ let ResourcePropertyViewWidgetProvider = class ResourcePropertyViewWidgetProvide
|
|
|
48
45
|
this.getPropertyDataService(selection).then(service => this.treeWidget.updatePropertyViewContent(service, selection));
|
|
49
46
|
}
|
|
50
47
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
(0, inversify_1.inject)(resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget),
|
|
54
|
-
tslib_1.__metadata("design:type", resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget)
|
|
48
|
+
__decorate([
|
|
49
|
+
inject(ResourcePropertyViewTreeWidget)
|
|
55
50
|
], ResourcePropertyViewWidgetProvider.prototype, "treeWidget", void 0);
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
ResourcePropertyViewWidgetProvider = __decorate([
|
|
52
|
+
injectable()
|
|
58
53
|
], ResourcePropertyViewWidgetProvider);
|
|
54
|
+
export { ResourcePropertyViewWidgetProvider };
|
|
59
55
|
//# sourceMappingURL=resource-property-view-widget-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-property-view-widget-provider.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-widget-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resource-property-view-widget-provider.js","sourceRoot":"","sources":["../../../src/browser/resource-property-view/resource-property-view-widget-provider.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,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mB,CAAC,SAA6B;QACtD,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAC1H,CAAC;CAEJ,CAAA;AAzBqD;IAAjD,MAAM,CAAC,8BAA8B,CAAC;sEAAsD;AAFpF,kCAAkC;IAD9C,UAAU,EAAE;GACA,kCAAkC,CA2B9C"}
|
package/lib/package.spec.d.ts
CHANGED
package/lib/package.spec.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -24,4 +23,5 @@
|
|
|
24
23
|
describe('property-view package', () => {
|
|
25
24
|
it('support code coverage statistics', () => true);
|
|
26
25
|
});
|
|
26
|
+
export {};
|
|
27
27
|
//# sourceMappingURL=package.spec.js.map
|
package/lib/package.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF;;;;;;qBAMqB;AAErB,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAEnC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAEvD,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/property-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0-next.0+b0e3080cb",
|
|
4
4
|
"description": "Theia - Property View Extension",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
7
|
-
"@theia/filesystem": "1.
|
|
7
|
+
"@theia/core": "1.78.0-next.0+b0e3080cb",
|
|
8
|
+
"@theia/filesystem": "1.78.0-next.0+b0e3080cb",
|
|
8
9
|
"tslib": "^2.8.1"
|
|
9
10
|
},
|
|
10
11
|
"publishConfig": {
|
|
@@ -40,10 +41,18 @@
|
|
|
40
41
|
"watch": "theiaext watch"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@theia/ext-scripts": "1.
|
|
44
|
+
"@theia/ext-scripts": "1.77.0"
|
|
44
45
|
},
|
|
45
46
|
"nyc": {
|
|
46
47
|
"extends": "../../configs/nyc.json"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b0e3080cb1b1fff5616555f1bf679834129da171",
|
|
50
|
+
"exports": {
|
|
51
|
+
"./package.json": "./package.json",
|
|
52
|
+
"./lib/browser/resource-property-view": "./lib/browser/resource-property-view/index.js",
|
|
53
|
+
"./lib/*.json": "./lib/*.json",
|
|
54
|
+
"./lib/*.js": "./lib/*.js",
|
|
55
|
+
"./lib/*": "./lib/*.js",
|
|
56
|
+
"./*": "./*"
|
|
57
|
+
}
|
|
49
58
|
}
|
|
@@ -18,8 +18,8 @@ import { nls } from '@theia/core/lib/common/nls';
|
|
|
18
18
|
import { ReactWidget } from '@theia/core/lib/browser';
|
|
19
19
|
import { injectable } from '@theia/core/shared/inversify';
|
|
20
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';
|
|
21
|
+
import { PropertyViewContentWidget } from './property-view-content-widget.js';
|
|
22
|
+
import { DefaultPropertyViewWidgetProvider } from './property-view-widget-provider.js';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Property view widget that is shown if no property data or selection is available.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
18
|
-
import { PropertyDataService } from './property-data-service';
|
|
18
|
+
import { PropertyDataService } from './property-data-service.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* A widget that fetches the property data via the given {@link PropertyDataService} and the given selection
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
|
18
18
|
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { PropertyViewWidget } from './property-view-widget';
|
|
19
|
+
import { PropertyViewWidget } from './property-view-widget.js';
|
|
20
20
|
|
|
21
21
|
@injectable()
|
|
22
22
|
export class PropertyViewContribution extends AbstractViewContribution<PropertyViewWidget> {
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
import { bindViewContribution, WidgetFactory } from '@theia/core/lib/browser';
|
|
18
18
|
import { bindRootContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
19
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';
|
|
20
|
+
import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider.js';
|
|
21
|
+
import { PropertyDataService } from './property-data-service.js';
|
|
22
|
+
import { PropertyViewContribution } from './property-view-contribution.js';
|
|
23
|
+
import { PropertyViewService } from './property-view-service.js';
|
|
24
|
+
import { PropertyViewWidget } from './property-view-widget.js';
|
|
25
|
+
import { PropertyViewWidgetProvider } from './property-view-widget-provider.js';
|
|
26
|
+
import { bindResourcePropertyView } from './resource-property-view/index.js';
|
|
27
27
|
import '../../src/browser/style/property-view.css';
|
|
28
28
|
|
|
29
29
|
export default new ContainerModule(bind => {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { ContributionProvider, Prioritizeable } from '@theia/core';
|
|
18
18
|
import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
|
|
19
|
-
import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider';
|
|
20
|
-
import { PropertyViewWidgetProvider } from './property-view-widget-provider';
|
|
19
|
+
import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider.js';
|
|
20
|
+
import { PropertyViewWidgetProvider } from './property-view-widget-provider.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* `PropertyViewService` provides an access to existing property view widget providers.
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { ContributionProvider, MaybePromise, Prioritizeable } from '@theia/core';
|
|
18
18
|
import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
|
|
19
|
-
import { PropertyDataService } from './property-data-service';
|
|
20
|
-
import { PropertyViewContentWidget } from './property-view-content-widget';
|
|
19
|
+
import { PropertyDataService } from './property-data-service.js';
|
|
20
|
+
import { PropertyViewContentWidget } from './property-view-content-widget.js';
|
|
21
21
|
|
|
22
22
|
export const PropertyViewWidgetProvider = Symbol('PropertyViewWidgetProvider');
|
|
23
23
|
/**
|
|
@@ -19,8 +19,8 @@ import { Disposable, SelectionService } from '@theia/core';
|
|
|
19
19
|
import { BaseWidget, codicon, MessageLoop, Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
20
20
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
21
21
|
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
22
|
-
import { PropertyViewContentWidget } from './property-view-content-widget';
|
|
23
|
-
import { PropertyViewService } from './property-view-service';
|
|
22
|
+
import { PropertyViewContentWidget } from './property-view-content-widget.js';
|
|
23
|
+
import { PropertyViewService } from './property-view-service.js';
|
|
24
24
|
import { nls } from '@theia/core/lib/common/nls';
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
export * from './resource-property-view-tree-container';
|
|
17
|
+
export * from './resource-property-view-tree-container.js';
|
|
@@ -23,10 +23,10 @@ FrontendApplicationConfigProvider.set({});
|
|
|
23
23
|
|
|
24
24
|
import { expect } from 'chai';
|
|
25
25
|
import { Container } from '@theia/core/shared/inversify';
|
|
26
|
-
import { ResourcePropertyDataService } from './resource-property-data-service';
|
|
26
|
+
import { ResourcePropertyDataService } from './resource-property-data-service.js';
|
|
27
27
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
28
28
|
import URI from '@theia/core/lib/common/uri';
|
|
29
|
-
import { PropertyDataService } from '../property-data-service';
|
|
29
|
+
import { PropertyDataService } from '../property-data-service.js';
|
|
30
30
|
import { FileSelection } from '@theia/filesystem/lib/browser/file-selection';
|
|
31
31
|
import { Navigatable } from '@theia/core/lib/browser/navigatable';
|
|
32
32
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
@@ -20,7 +20,7 @@ import { FileSelection } from '@theia/filesystem/lib/browser/file-selection';
|
|
|
20
20
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
21
21
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
22
22
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
23
|
-
import { PropertyDataService } from '../property-data-service';
|
|
23
|
+
import { PropertyDataService } from '../property-data-service.js';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* This data service provides property data for {@link FileSelection}s and selections of {@link Navigatable}s.
|
|
@@ -24,10 +24,10 @@ FrontendApplicationConfigProvider.set({});
|
|
|
24
24
|
|
|
25
25
|
import { Container } from '@theia/core/shared/inversify';
|
|
26
26
|
import { TreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
27
|
-
import { DEFAULT_INFO_ICON, ResourcePropertiesLabelProvider, } from './resource-property-view-label-provider';
|
|
27
|
+
import { DEFAULT_INFO_ICON, ResourcePropertiesLabelProvider, } from './resource-property-view-label-provider.js';
|
|
28
28
|
import { LabelProvider, LabelProviderContribution } from '@theia/core/lib/browser/label-provider';
|
|
29
29
|
import { ContributionProvider } from '@theia/core/lib/common';
|
|
30
|
-
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items';
|
|
30
|
+
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items.js';
|
|
31
31
|
|
|
32
32
|
disableJSDOM();
|
|
33
33
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { codicon, LabelProvider, LabelProviderContribution, TreeNode } from '@theia/core/lib/browser';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items';
|
|
19
|
+
import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items.js';
|
|
20
20
|
|
|
21
21
|
export const DEFAULT_INFO_ICON = codicon('info');
|
|
22
22
|
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
import { createTreeContainer, LabelProviderContribution, TreeProps } from '@theia/core/lib/browser';
|
|
18
18
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
19
|
-
import { PropertyDataService } from '../property-data-service';
|
|
20
|
-
import { PropertyViewWidgetProvider } from '../property-view-widget-provider';
|
|
21
|
-
import { ResourcePropertyDataService } from './resource-property-data-service';
|
|
22
|
-
import { ResourcePropertiesLabelProvider } from './resource-property-view-label-provider';
|
|
23
|
-
import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget';
|
|
24
|
-
import { ResourcePropertyViewWidgetProvider } from './resource-property-view-widget-provider';
|
|
19
|
+
import { PropertyDataService } from '../property-data-service.js';
|
|
20
|
+
import { PropertyViewWidgetProvider } from '../property-view-widget-provider.js';
|
|
21
|
+
import { ResourcePropertyDataService } from './resource-property-data-service.js';
|
|
22
|
+
import { ResourcePropertiesLabelProvider } from './resource-property-view-label-provider.js';
|
|
23
|
+
import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget.js';
|
|
24
|
+
import { ResourcePropertyViewWidgetProvider } from './resource-property-view-widget-provider.js';
|
|
25
25
|
|
|
26
26
|
const RESOURCE_PROPERTY_VIEW_TREE_PROPS = {
|
|
27
27
|
multiSelect: true,
|