@opensumi/ide-outline 2.21.8-rc-1670567192.0 → 2.21.8
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/outline-node.js +1 -1
- package/lib/browser/outline-node.js.map +1 -1
- package/lib/browser/outline-node.module.less +1 -2
- package/package.json +10 -11
- package/src/browser/index.ts +0 -33
- package/src/browser/outline-node.define.ts +0 -75
- package/src/browser/outline-node.module.less +0 -202
- package/src/browser/outline-node.tsx +0 -160
- package/src/browser/outline.contribution.ts +0 -146
- package/src/browser/outline.module.less +0 -11
- package/src/browser/outline.tsx +0 -150
- package/src/browser/services/outline-contextkey.service.ts +0 -18
- package/src/browser/services/outline-decoration.service.ts +0 -60
- package/src/browser/services/outline-event.service.ts +0 -45
- package/src/browser/services/outline-model.service.ts +0 -607
- package/src/browser/services/outline-model.ts +0 -38
- package/src/browser/services/outline-tree.service.ts +0 -180
- package/src/common/index.ts +0 -32
- package/src/index.ts +0 -1
|
@@ -35,7 +35,7 @@ const OutlineNode = ({ item, defaultLeftPadding = 8, leftPadding = 8, onClick, o
|
|
|
35
35
|
};
|
|
36
36
|
const renderIcon = (node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)(outline_node_module_less_1.default.icon, node.icon), style: { height: exports.OUTLINE_TREE_NODE_HEIGHT, lineHeight: `${exports.OUTLINE_TREE_NODE_HEIGHT}px` } }));
|
|
37
37
|
const getName = (node) => node.displayName.replace(/\n/g, '↵');
|
|
38
|
-
const renderDisplayName = (node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)(outline_node_module_less_1.default.outline_node_segment, outline_node_module_less_1.default.
|
|
38
|
+
const renderDisplayName = (node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)(outline_node_module_less_1.default.outline_node_segment, outline_node_module_less_1.default.outline_node_display_name, {
|
|
39
39
|
[outline_node_module_less_1.default.deprecated]: node.raw.tags && node.raw.tags.indexOf(document_symbol_1.SymbolTag.Deprecated) >= 0,
|
|
40
40
|
}) }, getName(node)));
|
|
41
41
|
const renderStatusTail = () => (react_1.default.createElement("div", { className: (0, classnames_1.default)(outline_node_module_less_1.default.outline_node_segment, outline_node_module_less_1.default.outline_node_tail) }, renderBadge()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline-node.js","sourceRoot":"","sources":["../../src/browser/outline-node.tsx"],"names":[],"mappings":";;;;AAAA,oEAA6B;AAC7B,0DAA0B;AAE1B,6DAMkC;AAClC,iEAA0E;AAC1E,iGAAwF;AAIxF,+DAAkF;AAClF,kGAAgD;AAoBzC,MAAM,WAAW,GAAuC,CAAC,EAC9D,IAAI,EACJ,kBAAkB,GAAG,CAAC,EACtB,WAAW,GAAG,CAAC,EACf,OAAO,EACP,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,WAAW,GACc,EAAE,EAAE;IAC7B,MAAM,UAAU,GAAG,qCAAe,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3F,MAAM,WAAW,GAAG,CAAC,EAAoB,EAAE,EAAE;QAC3C,IAAI,QAAQ,KAAK,6BAAY,CAAC,QAAQ,IAAI,QAAQ,KAAK,6BAAY,CAAC,iBAAiB,EAAE;YACrF,OAAO,CAAC,EAAE,EAAE,IAAuB,EAAE,QAAQ,CAAC,CAAC;SAChD;IACH,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,CAAC,EAAoB,EAAE,EAAE;QACpD,IAAI,QAAQ,KAAK,6BAAY,CAAC,QAAQ,IAAI,QAAQ,KAAK,6BAAY,CAAC,iBAAiB,EAAE;YACrF,IAAI,eAAe,EAAE;gBACnB,eAAe,CAAC,EAAE,EAAE,IAAuB,EAAE,QAAQ,CAAC,CAAC;aACxD;iBAAM;gBACL,OAAO,CAAC,EAAE,EAAE,IAAuB,EAAE,QAAQ,CAAC,CAAC;aAChD;S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,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAC/E,KAAK,EAAE,eAAe,aACb,IAAI,CAAC,EAAE;QAEhB,uCAAK,SAAS,EAAE,IAAA,oBAAG,EAAC,kCAAM,CAAC,oBAAoB,CAAC;YAC7C,WAAW,CAAC,IAAI,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC;YACjB,uCAAK,SAAS,EAAE,kCAAM,CAAC,0BAA0B;gBAC9C,iBAAiB,CAAC,IAAI,CAAC;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CACpB;YACL,gBAAgB,EAAE,CACf,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAzHW,QAAA,WAAW,eAyHtB;AAEW,QAAA,wBAAwB,GAAG,EAAE,CAAC"}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
text-decoration: line-through;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.
|
|
119
|
+
.outline_node_display_name {
|
|
120
120
|
margin-right: 6px;
|
|
121
121
|
display: inline;
|
|
122
122
|
white-space: pre;
|
|
@@ -135,7 +135,6 @@
|
|
|
135
135
|
text-overflow: ellipsis;
|
|
136
136
|
white-space: nowrap;
|
|
137
137
|
text-align: left;
|
|
138
|
-
color: var(--foreground);
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
.outline_node_flex_wrap {
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-outline",
|
|
3
|
-
"version": "2.21.8
|
|
3
|
+
"version": "2.21.8",
|
|
4
4
|
"files": [
|
|
5
|
-
"lib"
|
|
6
|
-
"src"
|
|
5
|
+
"lib"
|
|
7
6
|
],
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"main": "lib/index.js",
|
|
@@ -17,14 +16,14 @@
|
|
|
17
16
|
"url": "git@github.com:opensumi/core.git"
|
|
18
17
|
},
|
|
19
18
|
"devDependencies": {
|
|
20
|
-
"@opensumi/ide-components": "2.21.8
|
|
21
|
-
"@opensumi/ide-core-browser": "2.21.8
|
|
22
|
-
"@opensumi/ide-core-common": "2.21.8
|
|
19
|
+
"@opensumi/ide-components": "2.21.8",
|
|
20
|
+
"@opensumi/ide-core-browser": "2.21.8",
|
|
21
|
+
"@opensumi/ide-core-common": "2.21.8",
|
|
23
22
|
"@opensumi/ide-dev-tool": "^1.3.1",
|
|
24
|
-
"@opensumi/ide-editor": "2.21.8
|
|
25
|
-
"@opensumi/ide-explorer": "2.21.8
|
|
26
|
-
"@opensumi/ide-main-layout": "2.21.8
|
|
27
|
-
"@opensumi/ide-theme": "2.21.8
|
|
23
|
+
"@opensumi/ide-editor": "2.21.8",
|
|
24
|
+
"@opensumi/ide-explorer": "2.21.8",
|
|
25
|
+
"@opensumi/ide-main-layout": "2.21.8",
|
|
26
|
+
"@opensumi/ide-theme": "2.21.8"
|
|
28
27
|
},
|
|
29
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "603eaa81756ee0e8a58871fb67cfb01c8499593a"
|
|
30
29
|
}
|
package/src/browser/index.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Provider, Injectable } from '@opensumi/di';
|
|
2
|
-
import { BrowserModule } from '@opensumi/ide-core-browser';
|
|
3
|
-
|
|
4
|
-
import { IOutlineDecorationService } from '../common';
|
|
5
|
-
|
|
6
|
-
import { OutlineContribution } from './outline.contribution';
|
|
7
|
-
import { OutlineDecorationService } from './services/outline-decoration.service';
|
|
8
|
-
import { OutlineEventService } from './services/outline-event.service';
|
|
9
|
-
import { OutlineModelService } from './services/outline-model.service';
|
|
10
|
-
import { OutlineTreeService } from './services/outline-tree.service';
|
|
11
|
-
|
|
12
|
-
@Injectable()
|
|
13
|
-
export class OutlineModule extends BrowserModule {
|
|
14
|
-
providers: Provider[] = [
|
|
15
|
-
{
|
|
16
|
-
token: IOutlineDecorationService,
|
|
17
|
-
useClass: OutlineDecorationService,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
token: OutlineEventService,
|
|
21
|
-
useClass: OutlineEventService,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
token: OutlineTreeService,
|
|
25
|
-
useClass: OutlineTreeService,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
token: OutlineModelService,
|
|
29
|
-
useClass: OutlineModelService,
|
|
30
|
-
},
|
|
31
|
-
OutlineContribution,
|
|
32
|
-
];
|
|
33
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { TreeNode, CompositeTreeNode, ITree } from '@opensumi/ide-components';
|
|
2
|
-
import { MaybeNull, URI } from '@opensumi/ide-core-common';
|
|
3
|
-
import { INormalizedDocumentSymbol } from '@opensumi/ide-editor/lib/browser/breadcrumb/document-symbol';
|
|
4
|
-
|
|
5
|
-
import { OutlineTreeService } from './services/outline-tree.service';
|
|
6
|
-
export class OutlineRoot extends CompositeTreeNode {
|
|
7
|
-
static is(node: OutlineCompositeTreeNode | OutlineRoot): node is OutlineRoot {
|
|
8
|
-
return !!node && !node.parent;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
private _currentUri: MaybeNull<URI>;
|
|
12
|
-
|
|
13
|
-
constructor(tree: OutlineTreeService, currentUri: MaybeNull<URI>) {
|
|
14
|
-
super(tree as ITree, undefined);
|
|
15
|
-
this._currentUri = currentUri;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get currentUri() {
|
|
19
|
-
return this._currentUri;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get expanded() {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// OutlineCompositeTreeNode 节点不包含父节点, 同时默认为展开状态
|
|
28
|
-
export class OutlineCompositeTreeNode extends CompositeTreeNode {
|
|
29
|
-
static is(node: OutlineCompositeTreeNode | OutlineTreeNode): node is OutlineCompositeTreeNode {
|
|
30
|
-
return (
|
|
31
|
-
!!node && !!(node as OutlineCompositeTreeNode).raw && !!(node as OutlineCompositeTreeNode).raw.children?.length
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
constructor(
|
|
36
|
-
tree: OutlineTreeService,
|
|
37
|
-
parent: OutlineCompositeTreeNode | OutlineRoot,
|
|
38
|
-
public readonly raw: INormalizedDocumentSymbol,
|
|
39
|
-
public readonly icon: string,
|
|
40
|
-
) {
|
|
41
|
-
super(tree as ITree, parent, undefined, {});
|
|
42
|
-
this.isExpanded = true;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
get displayName() {
|
|
46
|
-
return this.raw.name;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get description() {
|
|
50
|
-
return this.raw.detail;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export class OutlineTreeNode extends TreeNode {
|
|
55
|
-
static is(node: OutlineTreeNode): node is OutlineTreeNode {
|
|
56
|
-
return !!node && !!(node as OutlineTreeNode).raw;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
constructor(
|
|
60
|
-
tree: OutlineTreeService,
|
|
61
|
-
parent: OutlineCompositeTreeNode | OutlineRoot,
|
|
62
|
-
public readonly raw: INormalizedDocumentSymbol,
|
|
63
|
-
public readonly icon: string,
|
|
64
|
-
) {
|
|
65
|
-
super(tree as ITree, parent, undefined, {});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get displayName() {
|
|
69
|
-
return this.raw.name;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
get description() {
|
|
73
|
-
return this.raw.detail;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
.outline_node {
|
|
2
|
-
height: 22px;
|
|
3
|
-
line-height: 22px;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
position: relative;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
|
|
9
|
-
&:hover {
|
|
10
|
-
color: var(--kt-tree-hoverForeground);
|
|
11
|
-
background: var(--kt-tree-hoverBackground);
|
|
12
|
-
.outline_action_bar {
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
&::before {
|
|
16
|
-
display: none !important;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.mod_selected {
|
|
21
|
-
color: var(--kt-tree-inactiveSelectionForeground) !important;
|
|
22
|
-
background: var(--kt-tree-inactiveSelectionBackground);
|
|
23
|
-
.expansion_toggle,
|
|
24
|
-
.outline_node_description {
|
|
25
|
-
color: var(--kt-tree-inactiveSelectionForeground) !important;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.mod_focused {
|
|
30
|
-
outline: 1px solid var(--list-focusOutline);
|
|
31
|
-
outline-offset: -1px;
|
|
32
|
-
color: var(--kt-tree-activeSelectionForeground) !important;
|
|
33
|
-
background: var(--kt-tree-activeSelectionBackground);
|
|
34
|
-
.expansion_toggle,
|
|
35
|
-
.outline_node_description {
|
|
36
|
-
color: var(--kt-tree-activeSelectionForeground) !important;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.mod_dirty {
|
|
41
|
-
&::before {
|
|
42
|
-
content: '';
|
|
43
|
-
display: block;
|
|
44
|
-
width: 8px;
|
|
45
|
-
height: 8px;
|
|
46
|
-
border-radius: 4px;
|
|
47
|
-
margin: 7px 5px;
|
|
48
|
-
background: var(--kt-dirtyDot-foreground);
|
|
49
|
-
position: absolute;
|
|
50
|
-
left: 18px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.expansion_toggle {
|
|
56
|
-
min-width: 20px;
|
|
57
|
-
display: flex;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
flex-shrink: 0;
|
|
60
|
-
font-size: 16px;
|
|
61
|
-
color: var(--foreground);
|
|
62
|
-
&.mod_collapsed {
|
|
63
|
-
&:before {
|
|
64
|
-
display: block;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:not(.mod_collapsed) {
|
|
69
|
-
&:before {
|
|
70
|
-
display: block;
|
|
71
|
-
transform: rotate(90deg);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.outline_node_description {
|
|
77
|
-
display: inline;
|
|
78
|
-
transform: scale(0.96);
|
|
79
|
-
color: var(--descriptionForeground);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.outline_node_content {
|
|
83
|
-
position: relative;
|
|
84
|
-
display: flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
width: 100%;
|
|
87
|
-
|
|
88
|
-
match {
|
|
89
|
-
background-color: var(--editor-findMatchHighlightBackground);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.outline_node_status {
|
|
94
|
-
opacity: 0.75;
|
|
95
|
-
text-align: center;
|
|
96
|
-
font-size: 12px;
|
|
97
|
-
padding-right: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.outline_node_segment {
|
|
101
|
-
flex-grow: 0;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
color: inherit;
|
|
104
|
-
&_grow {
|
|
105
|
-
flex-grow: 1 !important;
|
|
106
|
-
text-align: left;
|
|
107
|
-
z-index: 10;
|
|
108
|
-
padding-right: 5px;
|
|
109
|
-
|
|
110
|
-
&.overflow_visible {
|
|
111
|
-
overflow: visible !important;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
.deprecated {
|
|
116
|
-
text-decoration: line-through;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.outline_node_displayname {
|
|
120
|
-
margin-right: 6px;
|
|
121
|
-
display: inline;
|
|
122
|
-
white-space: pre;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.outline_node_description {
|
|
126
|
-
display: inline;
|
|
127
|
-
transform: scale(0.96);
|
|
128
|
-
color: var(--descriptionForeground);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.outline_node_overflow_wrap {
|
|
132
|
-
flex: 1;
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
text-overflow: ellipsis;
|
|
136
|
-
white-space: nowrap;
|
|
137
|
-
text-align: left;
|
|
138
|
-
color: var(--foreground);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.outline_node_flex_wrap {
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: row;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.outline_node_segment_grow {
|
|
147
|
-
flex-grow: 1 !important;
|
|
148
|
-
text-align: left;
|
|
149
|
-
z-index: 10;
|
|
150
|
-
padding-right: 5px;
|
|
151
|
-
|
|
152
|
-
&.overflow_visible {
|
|
153
|
-
overflow: visible !important;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.icon {
|
|
158
|
-
position: relative;
|
|
159
|
-
color: var(--icon-foreground);
|
|
160
|
-
margin-right: 4px;
|
|
161
|
-
&:before {
|
|
162
|
-
font-size: 16px;
|
|
163
|
-
text-align: center;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.icon:global(&.fileIcon:before) {
|
|
168
|
-
font-size: 18px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.outline_node_tail {
|
|
172
|
-
text-align: center;
|
|
173
|
-
margin-right: 10px;
|
|
174
|
-
position: relative;
|
|
175
|
-
height: 22px;
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.outline_action_bar {
|
|
181
|
-
position: absolute;
|
|
182
|
-
top: 0;
|
|
183
|
-
left: 0;
|
|
184
|
-
width: 100%;
|
|
185
|
-
display: flex;
|
|
186
|
-
display: none;
|
|
187
|
-
z-index: 10;
|
|
188
|
-
.action_icon {
|
|
189
|
-
margin-left: 6px;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.outline_left_actions {
|
|
194
|
-
position: absolute;
|
|
195
|
-
left: 14px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.outline_right_actions {
|
|
199
|
-
right: 0;
|
|
200
|
-
position: absolute;
|
|
201
|
-
margin-right: 10px;
|
|
202
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import cls from 'classnames';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
TreeNode,
|
|
6
|
-
CompositeTreeNode,
|
|
7
|
-
INodeRendererProps,
|
|
8
|
-
ClasslistComposite,
|
|
9
|
-
TreeNodeType,
|
|
10
|
-
} from '@opensumi/ide-components';
|
|
11
|
-
import { URI, getIcon, CommandService } from '@opensumi/ide-core-browser';
|
|
12
|
-
import { SymbolTag } from '@opensumi/ide-editor/lib/browser/breadcrumb/document-symbol';
|
|
13
|
-
|
|
14
|
-
import { IOutlineDecorationService } from '../common';
|
|
15
|
-
|
|
16
|
-
import { OutlineCompositeTreeNode, OutlineTreeNode } from './outline-node.define';
|
|
17
|
-
import styles from './outline-node.module.less';
|
|
18
|
-
|
|
19
|
-
export interface IOutlineNodeProps {
|
|
20
|
-
item: any;
|
|
21
|
-
defaultLeftPadding?: number;
|
|
22
|
-
leftPadding?: number;
|
|
23
|
-
decorationService: IOutlineDecorationService;
|
|
24
|
-
commandService: CommandService;
|
|
25
|
-
decorations?: ClasslistComposite;
|
|
26
|
-
onClick: (ev: React.MouseEvent, item: TreeNode | CompositeTreeNode, type: TreeNodeType, activeUri?: URI) => void;
|
|
27
|
-
onTwistierClick: (
|
|
28
|
-
ev: React.MouseEvent,
|
|
29
|
-
item: TreeNode | CompositeTreeNode,
|
|
30
|
-
type: TreeNodeType,
|
|
31
|
-
activeUri?: URI,
|
|
32
|
-
) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type OutlineNodeRenderedProps = IOutlineNodeProps & INodeRendererProps;
|
|
36
|
-
|
|
37
|
-
export const OutlineNode: React.FC<OutlineNodeRenderedProps> = ({
|
|
38
|
-
item,
|
|
39
|
-
defaultLeftPadding = 8,
|
|
40
|
-
leftPadding = 8,
|
|
41
|
-
onClick,
|
|
42
|
-
onTwistierClick,
|
|
43
|
-
itemType,
|
|
44
|
-
decorationService,
|
|
45
|
-
decorations,
|
|
46
|
-
}: OutlineNodeRenderedProps) => {
|
|
47
|
-
const decoration = OutlineTreeNode.is(item) ? decorationService.getDecoration(item) : null;
|
|
48
|
-
|
|
49
|
-
const handleClick = (ev: React.MouseEvent) => {
|
|
50
|
-
if (itemType === TreeNodeType.TreeNode || itemType === TreeNodeType.CompositeTreeNode) {
|
|
51
|
-
onClick(ev, item as OutlineTreeNode, itemType);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const handlerTwistierClick = (ev: React.MouseEvent) => {
|
|
56
|
-
if (itemType === TreeNodeType.TreeNode || itemType === TreeNodeType.CompositeTreeNode) {
|
|
57
|
-
if (onTwistierClick) {
|
|
58
|
-
onTwistierClick(ev, item as OutlineTreeNode, itemType);
|
|
59
|
-
} else {
|
|
60
|
-
onClick(ev, item as OutlineTreeNode, itemType);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const paddingLeft = `${
|
|
66
|
-
defaultLeftPadding + (item.depth || 0) * (leftPadding || 0) + (!OutlineCompositeTreeNode.is(item) ? 16 : 0)
|
|
67
|
-
}px`;
|
|
68
|
-
|
|
69
|
-
const editorNodeStyle = {
|
|
70
|
-
color: decoration ? decoration.color : '',
|
|
71
|
-
height: OUTLINE_TREE_NODE_HEIGHT,
|
|
72
|
-
lineHeight: `${OUTLINE_TREE_NODE_HEIGHT}px`,
|
|
73
|
-
paddingLeft,
|
|
74
|
-
} as React.CSSProperties;
|
|
75
|
-
|
|
76
|
-
const renderIcon = (node: OutlineCompositeTreeNode | OutlineTreeNode) => (
|
|
77
|
-
<div
|
|
78
|
-
className={cls(styles.icon, node.icon)}
|
|
79
|
-
style={{ height: OUTLINE_TREE_NODE_HEIGHT, lineHeight: `${OUTLINE_TREE_NODE_HEIGHT}px` }}
|
|
80
|
-
></div>
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
const getName = (node: OutlineCompositeTreeNode | OutlineTreeNode) => node.displayName.replace(/\n/g, '↵');
|
|
84
|
-
|
|
85
|
-
const renderDisplayName = (node: OutlineCompositeTreeNode | OutlineTreeNode) => (
|
|
86
|
-
<div
|
|
87
|
-
className={cls(styles.outline_node_segment, styles.outline_node_displayname, {
|
|
88
|
-
[styles.deprecated]: node.raw.tags && node.raw.tags.indexOf(SymbolTag.Deprecated) >= 0,
|
|
89
|
-
})}
|
|
90
|
-
>
|
|
91
|
-
{getName(node)}
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const renderStatusTail = () => (
|
|
96
|
-
<div className={cls(styles.outline_node_segment, styles.outline_node_tail)}>{renderBadge()}</div>
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
const renderBadge = () => {
|
|
100
|
-
if (!decoration) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
return <div className={styles.outline_node_status}>{decoration.badge.slice()}</div>;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const renderFolderToggle = (node: OutlineCompositeTreeNode, clickHandler: any) => (
|
|
107
|
-
<div
|
|
108
|
-
onClick={clickHandler}
|
|
109
|
-
className={cls(styles.file_tree_node_segment, styles.expansion_toggle, getIcon('arrow-right'), {
|
|
110
|
-
[`${styles.mod_collapsed}`]: !(node as OutlineCompositeTreeNode).expanded,
|
|
111
|
-
})}
|
|
112
|
-
/>
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
const renderTwice = (item) => {
|
|
116
|
-
if (OutlineCompositeTreeNode.is(item)) {
|
|
117
|
-
return renderFolderToggle(item, handlerTwistierClick);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const getItemTooltip = () => {
|
|
122
|
-
let tooltip = item.tooltip || item.displayName;
|
|
123
|
-
if (decoration && decoration.tooltip) {
|
|
124
|
-
tooltip += ` • ${decoration.tooltip}`;
|
|
125
|
-
}
|
|
126
|
-
return tooltip;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const renderDescription = (node: OutlineCompositeTreeNode | OutlineTreeNode) => {
|
|
130
|
-
if (OutlineCompositeTreeNode.is(node)) {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
return (
|
|
134
|
-
<div className={cls(styles.outline_node_segment_grow, styles.outline_node_description)}>{node.description}</div>
|
|
135
|
-
);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
return (
|
|
139
|
-
<div
|
|
140
|
-
key={item.id}
|
|
141
|
-
onClick={handleClick}
|
|
142
|
-
title={getItemTooltip()}
|
|
143
|
-
className={cls(styles.outline_node, decorations ? decorations.classlist : null)}
|
|
144
|
-
style={editorNodeStyle}
|
|
145
|
-
data-id={item.id}
|
|
146
|
-
>
|
|
147
|
-
<div className={cls(styles.outline_node_content)}>
|
|
148
|
-
{renderTwice(item)}
|
|
149
|
-
{renderIcon(item)}
|
|
150
|
-
<div className={styles.outline_node_overflow_wrap}>
|
|
151
|
-
{renderDisplayName(item)}
|
|
152
|
-
{renderDescription(item)}
|
|
153
|
-
</div>
|
|
154
|
-
{renderStatusTail()}
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const OUTLINE_TREE_NODE_HEIGHT = 22;
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { Autowired } from '@opensumi/di';
|
|
2
|
-
import {
|
|
3
|
-
OUTLINE_COMMANDS,
|
|
4
|
-
Domain,
|
|
5
|
-
localize,
|
|
6
|
-
TabBarToolbarContribution,
|
|
7
|
-
ToolbarRegistry,
|
|
8
|
-
CommandContribution,
|
|
9
|
-
CommandRegistry,
|
|
10
|
-
IContextKeyService,
|
|
11
|
-
} from '@opensumi/ide-core-browser';
|
|
12
|
-
import { getIcon } from '@opensumi/ide-core-browser';
|
|
13
|
-
import { OutlineSortTypeContext, OutlineFollowCursorContext } from '@opensumi/ide-core-browser/lib/contextkey';
|
|
14
|
-
import { EXPLORER_CONTAINER_ID } from '@opensumi/ide-explorer/lib/browser/explorer-contribution';
|
|
15
|
-
import { MainLayoutContribution, IMainLayoutService } from '@opensumi/ide-main-layout';
|
|
16
|
-
|
|
17
|
-
import { OutlineSortOrder, OUTLINE_VIEW_ID } from '../common';
|
|
18
|
-
|
|
19
|
-
import { OutlinePanel } from './outline';
|
|
20
|
-
import { OutlineModelService } from './services/outline-model.service';
|
|
21
|
-
import { OutlineTreeService } from './services/outline-tree.service';
|
|
22
|
-
|
|
23
|
-
@Domain(MainLayoutContribution, TabBarToolbarContribution, CommandContribution)
|
|
24
|
-
export class OutlineContribution implements MainLayoutContribution, TabBarToolbarContribution, CommandContribution {
|
|
25
|
-
@Autowired(IMainLayoutService)
|
|
26
|
-
private mainLayoutService: IMainLayoutService;
|
|
27
|
-
|
|
28
|
-
@Autowired()
|
|
29
|
-
private outlineTreeService: OutlineTreeService;
|
|
30
|
-
|
|
31
|
-
@Autowired()
|
|
32
|
-
private outlineTreeModelService: OutlineModelService;
|
|
33
|
-
|
|
34
|
-
@Autowired(IContextKeyService)
|
|
35
|
-
contextKey: IContextKeyService;
|
|
36
|
-
|
|
37
|
-
onDidRender() {
|
|
38
|
-
this.mainLayoutService.collectViewComponent(
|
|
39
|
-
{
|
|
40
|
-
component: OutlinePanel,
|
|
41
|
-
collapsed: true,
|
|
42
|
-
id: OUTLINE_VIEW_ID,
|
|
43
|
-
name: localize('outline.title'),
|
|
44
|
-
},
|
|
45
|
-
EXPLORER_CONTAINER_ID,
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
registerCommands(registry: CommandRegistry) {
|
|
50
|
-
registry.registerCommand(
|
|
51
|
-
{
|
|
52
|
-
id: OUTLINE_COMMANDS.OUTLINE_COLLAPSE_ALL.id,
|
|
53
|
-
iconClass: getIcon('collapse-all'),
|
|
54
|
-
label: localize('outline.collapse.all'),
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
execute: () => {
|
|
58
|
-
this.outlineTreeModelService.collapseAll();
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
);
|
|
62
|
-
registry.registerCommand(
|
|
63
|
-
{
|
|
64
|
-
id: OUTLINE_COMMANDS.OUTLINE_FOLLOW_CURSOR.id,
|
|
65
|
-
iconClass: getIcon('follow-cursor'),
|
|
66
|
-
toogleIconClass: getIcon('follow-cursor', { fill: true }),
|
|
67
|
-
label: localize('outline.follow.cursor'),
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
execute: () => {
|
|
71
|
-
this.outlineTreeService.followCursor = !this.outlineTreeService.followCursor;
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
);
|
|
75
|
-
registry.registerCommand(
|
|
76
|
-
{
|
|
77
|
-
id: OUTLINE_COMMANDS.OUTLINE_SORT_KIND.id,
|
|
78
|
-
label: localize('outline.sort.kind'),
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
execute: () => {
|
|
82
|
-
this.outlineTreeService.sortType = OutlineSortOrder.ByKind;
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
);
|
|
86
|
-
registry.registerCommand(
|
|
87
|
-
{
|
|
88
|
-
id: OUTLINE_COMMANDS.OUTLINE_SORT_NAME.id,
|
|
89
|
-
label: localize('outline.sort.name'),
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
execute: () => {
|
|
93
|
-
this.outlineTreeService.sortType = OutlineSortOrder.ByName;
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
);
|
|
97
|
-
registry.registerCommand(
|
|
98
|
-
{
|
|
99
|
-
id: OUTLINE_COMMANDS.OUTLINE_SORT_POSITION.id,
|
|
100
|
-
label: localize('outline.sort.position'),
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
execute: () => {
|
|
104
|
-
this.outlineTreeService.sortType = OutlineSortOrder.ByPosition;
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
registerToolbarItems(registry: ToolbarRegistry) {
|
|
111
|
-
registry.registerItem({
|
|
112
|
-
id: 'outline.action.follow.cursor',
|
|
113
|
-
viewId: 'outline-view',
|
|
114
|
-
command: OUTLINE_COMMANDS.OUTLINE_FOLLOW_CURSOR.id,
|
|
115
|
-
label: localize('outline.follow.cursor'),
|
|
116
|
-
toggledWhen: OutlineFollowCursorContext.raw,
|
|
117
|
-
});
|
|
118
|
-
registry.registerItem({
|
|
119
|
-
id: 'outline.action.collapse.all',
|
|
120
|
-
viewId: 'outline-view',
|
|
121
|
-
command: OUTLINE_COMMANDS.OUTLINE_COLLAPSE_ALL.id,
|
|
122
|
-
label: localize('outline.collapse.all'),
|
|
123
|
-
});
|
|
124
|
-
registry.registerItem({
|
|
125
|
-
id: 'outline.menu.sort.kind',
|
|
126
|
-
viewId: 'outline-view',
|
|
127
|
-
command: OUTLINE_COMMANDS.OUTLINE_SORT_KIND.id,
|
|
128
|
-
group: 'inline',
|
|
129
|
-
toggledWhen: `${OutlineSortTypeContext.raw} == ${OutlineSortOrder.ByKind}`,
|
|
130
|
-
});
|
|
131
|
-
registry.registerItem({
|
|
132
|
-
id: 'outline.menu.sort.name',
|
|
133
|
-
viewId: 'outline-view',
|
|
134
|
-
command: OUTLINE_COMMANDS.OUTLINE_SORT_NAME.id,
|
|
135
|
-
group: 'inline',
|
|
136
|
-
toggledWhen: `${OutlineSortTypeContext.raw} == ${OutlineSortOrder.ByName}`,
|
|
137
|
-
});
|
|
138
|
-
registry.registerItem({
|
|
139
|
-
id: 'outline.menu.sort.position',
|
|
140
|
-
viewId: 'outline-view',
|
|
141
|
-
command: OUTLINE_COMMANDS.OUTLINE_SORT_POSITION.id,
|
|
142
|
-
group: 'inline',
|
|
143
|
-
toggledWhen: `${OutlineSortTypeContext.raw} == ${OutlineSortOrder.ByPosition}`,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|