@eclipse-glsp-examples/workflow-glsp 0.9.0-next.fd1a8bb6 → 0.10.0-next.827bd0d.158
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/LICENSE +642 -277
- package/README.md +6 -4
- package/css/diagram.css +58 -38
- package/lib/di.config.d.ts +2 -17
- package/lib/di.config.d.ts.map +1 -1
- package/lib/di.config.js +8 -7
- package/lib/di.config.js.map +1 -1
- package/lib/model.d.ts +5 -0
- package/lib/model.d.ts.map +1 -1
- package/lib/model.js +27 -1
- package/lib/model.js.map +1 -1
- package/lib/workflow-views.d.ts.map +1 -1
- package/lib/workflow-views.js +2 -2
- package/lib/workflow-views.js.map +1 -1
- package/package.json +4 -3
- package/scripts/download.ts +19 -16
- package/src/di.config.ts +12 -83
- package/src/model.ts +25 -0
- package/src/workflow-views.tsx +2 -3
package/README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# workflow-glsp
|
|
2
2
|
|
|
3
|
-
This package contains the configuration for the GLSP diagrams of the Workflow example language.
|
|
3
|
+
This package contains the configuration for the GLSP diagrams of the Workflow example language.
|
|
4
|
+
It contains the base code that is independent from the actual application framework and integration variant.
|
|
5
|
+
Separating this base configuration and the actual integration code means that it can be reused for various different integration variants of the GLSP Workflow example language e.g in a Theia application, Standalone application, VS Code plugin or integrated into the Eclipse IDE.
|
|
4
6
|
|
|
5
7
|
## Building
|
|
6
|
-
This package is built with `yarn` and is available from npm via [@eclipse-glsp-examples/workflow-glsp](https://www.npmjs.com/package/@eclipse-glsp-examples/worfklow-glsp)
|
|
7
8
|
|
|
9
|
+
This package is built with `yarn` and is available from npm via [@eclipse-glsp-examples/workflow-glsp](https://www.npmjs.com/package/@eclipse-glsp-examples/worfklow-glsp)
|
|
8
10
|
|
|
9
11
|
## More information
|
|
10
12
|
|
|
11
|
-
For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
|
|
13
|
+
For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
|
|
14
|
+
If you have questions, contact us on our [spectrum chat](https://spectrum.chat/glsp/) and have a look at our [communication and support options](https://www.eclipse.org/glsp/contact/).
|
|
12
15
|
|
|
13
16
|

|
|
14
|
-
|
package/css/diagram.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2019-2021 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
.sprotty-text {
|
|
28
28
|
font-size: 12pt;
|
|
29
|
-
text-anchor: middle
|
|
29
|
+
text-anchor: middle;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.sprotty-node {
|
|
@@ -35,12 +35,11 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.sprotty-node.mouseover:not(.selected) {
|
|
38
|
-
stroke-width:
|
|
38
|
+
stroke-width: 2;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.sprotty-comp {
|
|
42
42
|
line-height: 3px;
|
|
43
|
-
font-weight: normal;
|
|
44
43
|
text-align: left;
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -53,16 +52,18 @@
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
.sprotty-label.heading {
|
|
56
|
-
font-weight:
|
|
55
|
+
font-weight: normal;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
.sprotty-icon {
|
|
60
|
-
|
|
61
|
-
stroke-width: 0;
|
|
59
|
+
stroke: black;
|
|
60
|
+
stroke-width: 0.5;
|
|
61
|
+
fill: #ffffff;
|
|
62
|
+
opacity: 0.5;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
.sprotty-label.icon {
|
|
65
|
-
fill:
|
|
66
|
+
fill: black;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.sprotty-button {
|
|
@@ -72,33 +73,33 @@
|
|
|
72
73
|
|
|
73
74
|
.sprotty-edge {
|
|
74
75
|
fill: none;
|
|
75
|
-
stroke-width:
|
|
76
|
+
stroke-width: 1px;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
.sprotty-edge.selected {
|
|
79
|
-
stroke-width:
|
|
80
|
+
stroke-width: 3px;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
.sprotty-edge.mouseover:not(.selected) {
|
|
83
|
-
stroke-width:
|
|
84
|
+
stroke-width: 2px;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
.sprotty-edge
|
|
87
|
+
.sprotty-edge > .sprotty-routing-handle {
|
|
87
88
|
r: 7px;
|
|
88
89
|
fill: #884;
|
|
89
90
|
stroke: none;
|
|
90
91
|
z-index: 1000;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
.sprotty-edge
|
|
94
|
+
.sprotty-edge > .sprotty-routing-handle[data-kind='line'] {
|
|
94
95
|
opacity: 0.35;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
.sprotty-edge
|
|
98
|
+
.sprotty-edge > .sprotty-routing-handle.selected {
|
|
98
99
|
fill: #66a;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
.sprotty-edge
|
|
102
|
+
.sprotty-edge > .sprotty-routing-handle.mouseover {
|
|
102
103
|
stroke: #112;
|
|
103
104
|
stroke-width: 1;
|
|
104
105
|
}
|
|
@@ -116,15 +117,19 @@
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
.sprotty-node.marquee {
|
|
119
|
-
fill:
|
|
120
|
+
fill: lightgray;
|
|
120
121
|
opacity: 0.2;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
.task.automated
|
|
124
|
-
fill:
|
|
124
|
+
.task.automated > .sprotty-node {
|
|
125
|
+
fill: lightgray;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
.task.manual
|
|
128
|
+
.task.manual > .sprotty-node {
|
|
129
|
+
fill: lightblue;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.category > .sprotty-node {
|
|
128
133
|
fill: lightblue;
|
|
129
134
|
}
|
|
130
135
|
|
|
@@ -137,24 +142,30 @@ text {
|
|
|
137
142
|
text-anchor: middle;
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
.sprotty-edge.weighted.low,
|
|
141
|
-
|
|
145
|
+
.sprotty-edge.weighted.low,
|
|
146
|
+
.sprotty-edge.weighted.low .arrow {
|
|
147
|
+
stroke: lightblue;
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
.sprotty-edge.weighted.low .arrow {
|
|
145
151
|
fill: lightblue;
|
|
146
152
|
}
|
|
147
153
|
|
|
148
|
-
.sprotty-edge.weighted,
|
|
149
|
-
|
|
154
|
+
.sprotty-edge.weighted,
|
|
155
|
+
.sprotty-edge.weighted .arrow,
|
|
156
|
+
.sprotty-edge.weighted.medium,
|
|
157
|
+
.sprotty-edge.weighted.medium .arrow {
|
|
158
|
+
stroke: #007fd4;
|
|
150
159
|
}
|
|
151
160
|
|
|
152
|
-
.sprotty-edge.weighted .arrow,
|
|
153
|
-
|
|
161
|
+
.sprotty-edge.weighted .arrow,
|
|
162
|
+
.sprotty-edge.weighted.medium .arrow {
|
|
163
|
+
fill: #007fd4;
|
|
154
164
|
}
|
|
155
165
|
|
|
156
|
-
.sprotty-edge.weighted.high,
|
|
157
|
-
|
|
166
|
+
.sprotty-edge.weighted.high,
|
|
167
|
+
.sprotty-edge.weighted.high .arrow {
|
|
168
|
+
stroke: darkblue;
|
|
158
169
|
}
|
|
159
170
|
|
|
160
171
|
.sprotty-edge.weighted.high .arrow {
|
|
@@ -167,7 +178,16 @@ polygon.sprotty-node {
|
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
.sprotty-node.selected {
|
|
170
|
-
stroke-width:
|
|
181
|
+
stroke-width: 3px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.sprotty-comp {
|
|
185
|
+
stroke: transparent;
|
|
186
|
+
fill: transparent;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.sprotty-comp.debug {
|
|
190
|
+
stroke: deepskyblue;
|
|
171
191
|
}
|
|
172
192
|
|
|
173
193
|
svg {
|
|
@@ -181,23 +201,23 @@ svg {
|
|
|
181
201
|
margin-left: -5px;
|
|
182
202
|
}
|
|
183
203
|
|
|
184
|
-
g .movement-not-allowed
|
|
185
|
-
stroke: var(--glsp-error-foreground)!important;
|
|
204
|
+
g .movement-not-allowed > .sprotty-node {
|
|
205
|
+
stroke: var(--glsp-error-foreground) !important;
|
|
186
206
|
}
|
|
187
207
|
|
|
188
208
|
.sprotty-resize-handle.movement-not-allowed {
|
|
189
|
-
stroke: var(--glsp-error-foreground)!important;
|
|
190
|
-
fill: var(--glsp-error-foreground)!important;
|
|
209
|
+
stroke: var(--glsp-error-foreground) !important;
|
|
210
|
+
fill: var(--glsp-error-foreground) !important;
|
|
191
211
|
}
|
|
192
212
|
|
|
193
|
-
.error
|
|
194
|
-
stroke: var(--glsp-error-foreground)!important;
|
|
213
|
+
.error > .sprotty-node {
|
|
214
|
+
stroke: var(--glsp-error-foreground) !important;
|
|
195
215
|
}
|
|
196
216
|
|
|
197
|
-
.warning
|
|
198
|
-
stroke: var(--glsp-warning-foreground)!important;
|
|
217
|
+
.warning > .sprotty-node {
|
|
218
|
+
stroke: var(--glsp-warning-foreground) !important;
|
|
199
219
|
}
|
|
200
220
|
|
|
201
|
-
.info
|
|
202
|
-
stroke: var(--glsp-info-foreground)!important;
|
|
221
|
+
.info > .sprotty-node {
|
|
222
|
+
stroke: var(--glsp-info-foreground) !important;
|
|
203
223
|
}
|
package/lib/di.config.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-2021 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 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
import '../css/diagram.css';
|
|
17
1
|
import 'balloon-css/balloon.min.css';
|
|
18
|
-
import 'sprotty/css/edit-label.css';
|
|
19
2
|
import { Container } from 'inversify';
|
|
3
|
+
import 'sprotty/css/edit-label.css';
|
|
4
|
+
import '../css/diagram.css';
|
|
20
5
|
export default function createContainer(widgetId: string): Container;
|
|
21
6
|
//# sourceMappingURL=di.config.d.ts.map
|
package/lib/di.config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAsCA,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAmB,MAAM,WAAW,CAAC;AACvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAgC5B,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAOnE"}
|
package/lib/di.config.js
CHANGED
|
@@ -15,18 +15,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
*
|
|
16
16
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
17
|
********************************************************************************/
|
|
18
|
-
require("../css/diagram.css");
|
|
19
|
-
require("balloon-css/balloon.min.css");
|
|
20
|
-
require("sprotty/css/edit-label.css");
|
|
21
18
|
const client_1 = require("@eclipse-glsp/client");
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
require("balloon-css/balloon.min.css");
|
|
22
21
|
const inversify_1 = require("inversify");
|
|
22
|
+
require("sprotty/css/edit-label.css");
|
|
23
|
+
require("../css/diagram.css");
|
|
23
24
|
const di_config_1 = require("./direct-task-editing/di.config");
|
|
24
25
|
const model_1 = require("./model");
|
|
25
26
|
const workflow_views_1 = require("./workflow-views");
|
|
26
27
|
const workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
27
28
|
rebind(client_1.TYPES.ILogger).to(client_1.ConsoleLogger).inSingletonScope();
|
|
28
29
|
rebind(client_1.TYPES.LogLevel).toConstantValue(client_1.LogLevel.warn);
|
|
29
|
-
bind(client_1.GLSP_TYPES.IMovementRestrictor).to(client_1.NoOverlapMovmentRestrictor).inSingletonScope();
|
|
30
30
|
bind(client_1.TYPES.ISnapper).to(client_1.GridSnapper);
|
|
31
31
|
bind(client_1.TYPES.ICommandPaletteActionProvider).to(client_1.RevealNamedElementActionProvider);
|
|
32
32
|
bind(client_1.TYPES.IContextMenuItemProvider).to(client_1.DeleteElementContextMenuItemProvider);
|
|
@@ -38,17 +38,18 @@ const workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isB
|
|
|
38
38
|
client_1.configureModelElement(context, 'comp:comp', client_1.SCompartment, client_1.SCompartmentView);
|
|
39
39
|
client_1.configureModelElement(context, 'comp:header', client_1.SCompartment, client_1.SCompartmentView);
|
|
40
40
|
client_1.configureModelElement(context, 'label:icon', client_1.SLabel, client_1.SLabelView);
|
|
41
|
-
client_1.configureModelElement(context,
|
|
41
|
+
client_1.configureModelElement(context, protocol_1.DefaultTypes.EDGE, client_1.SEdge, workflow_views_1.WorkflowEdgeView);
|
|
42
42
|
client_1.configureModelElement(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WorkflowEdgeView);
|
|
43
43
|
client_1.configureModelElement(context, 'icon', model_1.Icon, workflow_views_1.IconView);
|
|
44
44
|
client_1.configureModelElement(context, 'activityNode:merge', model_1.ActivityNode, client_1.DiamondNodeView);
|
|
45
45
|
client_1.configureModelElement(context, 'activityNode:decision', model_1.ActivityNode, client_1.DiamondNodeView);
|
|
46
46
|
client_1.configureModelElement(context, 'activityNode:fork', model_1.ActivityNode, client_1.RectangularNodeView);
|
|
47
47
|
client_1.configureModelElement(context, 'activityNode:join', model_1.ActivityNode, client_1.RectangularNodeView);
|
|
48
|
+
client_1.configureModelElement(context, 'category', model_1.CategoryNode, client_1.RoundedCornerNodeView);
|
|
49
|
+
client_1.configureModelElement(context, 'struct', client_1.SCompartment, client_1.StructureCompartmentView);
|
|
48
50
|
});
|
|
49
51
|
function createContainer(widgetId) {
|
|
50
|
-
const container =
|
|
51
|
-
container.load(client_1.defaultModule, client_1.defaultGLSPModule, client_1.glspMouseToolModule, client_1.validationModule, client_1.glspSelectModule, client_1.boundsModule, client_1.glspViewportModule, client_1.toolsModule, client_1.glspHoverModule, client_1.fadeModule, client_1.exportModule, client_1.expandModule, client_1.openModule, client_1.buttonModule, client_1.modelSourceModule, client_1.labelEditUiModule, client_1.glspEditLabelModule, workflowDiagramModule, client_1.toolFeedbackModule, client_1.modelHintsModule, client_1.glspContextMenuModule, client_1.glspServerCopyPasteModule, client_1.modelSourceWatcherModule, client_1.glspCommandPaletteModule, client_1.paletteModule, client_1.routingModule, client_1.glspDecorationModule, client_1.edgeLayoutModule, client_1.zorderModule, client_1.edgeIntersectionModule, client_1.layoutCommandsModule, di_config_1.directTaskEditor, client_1.navigationModule, client_1.markerNavigatorModule);
|
|
52
|
+
const container = client_1.createClientContainer(workflowDiagramModule, di_config_1.directTaskEditor);
|
|
52
53
|
client_1.overrideViewerOptions(container, {
|
|
53
54
|
baseDiv: widgetId,
|
|
54
55
|
hiddenDiv: widgetId + '_hidden'
|
package/lib/di.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAqB8B;AAC9B,qDAAsD;AACtD,uCAAqC;AACrC,yCAAuD;AACvD,sCAAoC;AACpC,8BAA4B;AAC5B,+DAAmE;AACnE,mCAAmF;AACnF,qDAA8D;AAE9D,MAAM,qBAAqB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAChF,MAAM,CAAC,cAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,sBAAa,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3D,MAAM,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;IACtD,IAAI,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,oBAAW,CAAC,CAAC;IACrC,IAAI,CAAC,cAAK,CAAC,6BAA6B,CAAC,CAAC,EAAE,CAAC,yCAAgC,CAAC,CAAC;IAC/E,IAAI,CAAC,cAAK,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,6CAAoC,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElD,s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,QAAQ,EAAE,qBAAY,EAAE,iCAAwB,CAAC,CAAC;AACrF,CAAC,CAAC,CAAC;AAEH,SAAwB,eAAe,CAAC,QAAgB;IACpD,MAAM,SAAS,GAAG,8BAAqB,CAAC,qBAAqB,EAAE,4BAAgB,CAAC,CAAC;IACjF,8BAAqB,CAAC,SAAS,EAAE;QAC7B,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,QAAQ,GAAG,SAAS;KAClC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACrB,CAAC;AAPD,kCAOC"}
|
package/lib/model.d.ts
CHANGED
|
@@ -56,4 +56,9 @@ export declare class Icon extends SShapeElement implements LayoutContainer {
|
|
|
56
56
|
height: number;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
+
export declare class CategoryNode extends RectangularNode implements Nameable, WithEditableLabel {
|
|
60
|
+
static readonly DEFAULT_FEATURES: symbol[];
|
|
61
|
+
name: string;
|
|
62
|
+
get editableLabel(): (SChildElement & EditableLabel) | undefined;
|
|
63
|
+
}
|
|
59
64
|
//# sourceMappingURL=model.d.ts.map
|
package/lib/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAIH,WAAW,EACX,aAAa,EAKb,eAAe,EAGf,QAAQ,EAGR,eAAe,EACf,aAAa,EACb,KAAK,EAEL,aAAa,EACb,aAAa,EACb,iBAAiB,EAEpB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,QAAS,SAAQ,eAAgB,YAAW,QAAQ,EAAE,iBAAiB;IAChF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAY9B;IACF,IAAI,SAAM;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,IAAI,a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 -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Icon = exports.ActivityNode = exports.WeightedEdge = exports.isTaskNode = exports.TaskNode = void 0;
|
|
3
|
+
exports.CategoryNode = exports.Icon = exports.ActivityNode = exports.WeightedEdge = exports.isTaskNode = exports.TaskNode = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
5
|
* Copyright (c) 2020-2021 EclipseSource and others.
|
|
6
6
|
*
|
|
@@ -89,4 +89,30 @@ class Icon extends client_1.SShapeElement {
|
|
|
89
89
|
}
|
|
90
90
|
exports.Icon = Icon;
|
|
91
91
|
Icon.DEFAULT_FEATURES = [client_1.boundsFeature, client_1.layoutContainerFeature, client_1.layoutableChildFeature, client_1.fadeFeature];
|
|
92
|
+
class CategoryNode extends client_1.RectangularNode {
|
|
93
|
+
constructor() {
|
|
94
|
+
super(...arguments);
|
|
95
|
+
this.name = '';
|
|
96
|
+
}
|
|
97
|
+
get editableLabel() {
|
|
98
|
+
const label = this.children.find(element => element.type === 'label:heading');
|
|
99
|
+
if (label && client_1.isEditableLabel(label)) {
|
|
100
|
+
return label;
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.CategoryNode = CategoryNode;
|
|
106
|
+
CategoryNode.DEFAULT_FEATURES = [
|
|
107
|
+
client_1.deletableFeature,
|
|
108
|
+
client_1.selectFeature,
|
|
109
|
+
client_1.boundsFeature,
|
|
110
|
+
client_1.moveFeature,
|
|
111
|
+
client_1.layoutContainerFeature,
|
|
112
|
+
client_1.fadeFeature,
|
|
113
|
+
client_1.hoverFeedbackFeature,
|
|
114
|
+
client_1.popupFeature,
|
|
115
|
+
client_1.nameFeature,
|
|
116
|
+
client_1.withEditLabelFeature
|
|
117
|
+
];
|
|
92
118
|
//# sourceMappingURL=model.js.map
|
package/lib/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
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e;IAAjD;;QAcI,SAAI,GAAG,EAAE,CAAC;IASd,CAAC;IAPG,IAAI,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;QAC9E,IAAI,KAAK,IAAI,wBAAe,CAAC,KAAK,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;;AAtBL,oCAuBC;AAtBmB,6BAAgB,GAAG;IAC/B,yBAAgB;IAChB,sBAAa;IACb,sBAAa;IACb,oBAAW;IACX,+BAAsB;IACtB,oBAAW;IACX,6BAAoB;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-views.d.ts","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,KAAK,EACL,KAAK,EACL,uCAAuC,EACvC,gBAAgB,EAChB,KAAK,EAER,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-views.d.ts","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,KAAK,EACL,KAAK,EACL,uCAAuC,EACvC,gBAAgB,EAChB,KAAK,EAER,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,qBACa,gBAAiB,SAAQ,uCAAuC;IACzE,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,EAAE;CAiBlG;AAED,qBACa,QAAS,YAAW,KAAK;IAClC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK;IAUvD,SAAS,IAAI,MAAM;CAGtB"}
|
package/lib/workflow-views.js
CHANGED
|
@@ -45,11 +45,11 @@ let IconView = class IconView {
|
|
|
45
45
|
render(element, context) {
|
|
46
46
|
const radius = this.getRadius();
|
|
47
47
|
return (JSX.createElement("g", null,
|
|
48
|
-
JSX.createElement("circle", { "class-sprotty-icon": true, r: radius, cx: radius, cy: radius }),
|
|
48
|
+
JSX.createElement("circle", { "class-sprotty-icon": true, r: radius, cx: radius + 2, cy: radius + 2 }),
|
|
49
49
|
context.renderChildren(element)));
|
|
50
50
|
}
|
|
51
51
|
getRadius() {
|
|
52
|
-
return
|
|
52
|
+
return 14;
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
IconView = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-views.js","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAQ8B;AAC9B,yCAAuC;AAEvC,qCAA8B;
|
|
1
|
+
{"version":3,"file":"workflow-views.js","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAQ8B;AAC9B,yCAAuC;AAEvC,qCAA8B;AAG9B,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,aAAG,EAAE,CAAC;AAGnC,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,gDAAuC;IAC/D,iBAAiB,CAAC,IAAW,EAAE,QAAiB,EAAE,OAAyB;QACjF,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC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
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-glsp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-next.827bd0d.158+827bd0d",
|
|
4
4
|
"description": "GLSP diagrams for the Workflow DSL",
|
|
5
5
|
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
6
6
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@eclipse-glsp/client": "0.
|
|
29
|
+
"@eclipse-glsp/client": "0.10.0-next.827bd0d.158+827bd0d",
|
|
30
30
|
"balloon-css": "^0.5.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -52,5 +52,6 @@
|
|
|
52
52
|
"types": "lib/index",
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "827bd0d9c5f53f106af6f8835316daf2a378ca4b"
|
|
56
57
|
}
|
package/scripts/download.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2020-2021 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,20 +13,23 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import download from
|
|
17
|
-
import { join, resolve } from
|
|
16
|
+
import download from 'mvn-artifact-download';
|
|
17
|
+
import { join, resolve } from 'path';
|
|
18
18
|
|
|
19
|
-
const downloadDir = resolve(join(__dirname)) +
|
|
20
|
-
const mavenRepository =
|
|
21
|
-
const groupId =
|
|
22
|
-
const artifactId =
|
|
23
|
-
const version =
|
|
24
|
-
const classifier =
|
|
19
|
+
const downloadDir = resolve(join(__dirname)) + '/../../..';
|
|
20
|
+
const mavenRepository = 'https://oss.sonatype.org/content/repositories/snapshots/';
|
|
21
|
+
const groupId = 'org.eclipse.glsp.example';
|
|
22
|
+
const artifactId = 'org.eclipse.glsp.example.workflow';
|
|
23
|
+
const version = '0.9.0';
|
|
24
|
+
const classifier = 'glsp';
|
|
25
25
|
|
|
26
|
-
console.log(
|
|
27
|
-
download({ groupId, artifactId, version, classifier, isSnapShot: true }, downloadDir, mavenRepository)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
console.log('Downloading latest version of the Workflow Example Java Server from the maven repository...');
|
|
27
|
+
download({ groupId, artifactId, version, classifier, isSnapShot: true }, downloadDir, mavenRepository).then(() =>
|
|
28
|
+
console.log(
|
|
29
|
+
'Download completed. Start the server using this command: \njava -jar org.eclipse.glsp.example.workflow-' +
|
|
30
|
+
version +
|
|
31
|
+
'-SNAPSHOT-glsp.jar org.eclipse.glsp.example.workflow.launch.ExampleServerLauncher --port=8081 --websocket\n\n' +
|
|
32
|
+
'After starting the server, access the following file locally in your browser to see the running example:\n' +
|
|
33
|
+
'./examples/workflow-standalone/app/diagram.html'
|
|
34
|
+
)
|
|
35
|
+
);
|
package/src/di.config.ts
CHANGED
|
@@ -13,75 +13,40 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import '../css/diagram.css';
|
|
17
|
-
import 'balloon-css/balloon.min.css';
|
|
18
|
-
import 'sprotty/css/edit-label.css';
|
|
19
|
-
|
|
20
16
|
import {
|
|
21
|
-
boundsModule,
|
|
22
|
-
buttonModule,
|
|
23
17
|
configureDefaultModelElements,
|
|
24
18
|
configureModelElement,
|
|
25
19
|
ConsoleLogger,
|
|
26
|
-
|
|
27
|
-
defaultModule,
|
|
28
|
-
DefaultTypes,
|
|
20
|
+
createClientContainer,
|
|
29
21
|
DeleteElementContextMenuItemProvider,
|
|
30
22
|
DiamondNodeView,
|
|
31
|
-
edgeIntersectionModule,
|
|
32
|
-
edgeLayoutModule,
|
|
33
23
|
editLabelFeature,
|
|
34
|
-
expandModule,
|
|
35
|
-
exportModule,
|
|
36
|
-
fadeModule,
|
|
37
|
-
GLSP_TYPES,
|
|
38
|
-
glspCommandPaletteModule,
|
|
39
|
-
glspContextMenuModule,
|
|
40
|
-
glspDecorationModule,
|
|
41
|
-
glspEditLabelModule,
|
|
42
|
-
glspHoverModule,
|
|
43
|
-
glspMouseToolModule,
|
|
44
|
-
glspSelectModule,
|
|
45
|
-
glspServerCopyPasteModule,
|
|
46
|
-
glspViewportModule,
|
|
47
24
|
GridSnapper,
|
|
48
|
-
labelEditUiModule,
|
|
49
|
-
layoutCommandsModule,
|
|
50
25
|
LogLevel,
|
|
51
|
-
markerNavigatorModule,
|
|
52
|
-
modelHintsModule,
|
|
53
|
-
modelSourceModule,
|
|
54
|
-
modelSourceWatcherModule,
|
|
55
|
-
navigationModule,
|
|
56
|
-
NoOverlapMovmentRestrictor,
|
|
57
|
-
openModule,
|
|
58
26
|
overrideViewerOptions,
|
|
59
|
-
paletteModule,
|
|
60
27
|
RectangularNodeView,
|
|
61
28
|
RevealNamedElementActionProvider,
|
|
62
29
|
RoundedCornerNodeView,
|
|
63
|
-
routingModule,
|
|
64
30
|
SCompartment,
|
|
65
31
|
SCompartmentView,
|
|
66
32
|
SEdge,
|
|
67
33
|
SLabel,
|
|
68
34
|
SLabelView,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
TYPES,
|
|
72
|
-
validationModule,
|
|
73
|
-
zorderModule
|
|
35
|
+
StructureCompartmentView,
|
|
36
|
+
TYPES
|
|
74
37
|
} from '@eclipse-glsp/client';
|
|
38
|
+
import { DefaultTypes } from '@eclipse-glsp/protocol';
|
|
39
|
+
import 'balloon-css/balloon.min.css';
|
|
75
40
|
import { Container, ContainerModule } from 'inversify';
|
|
76
|
-
|
|
41
|
+
import 'sprotty/css/edit-label.css';
|
|
42
|
+
import '../css/diagram.css';
|
|
77
43
|
import { directTaskEditor } from './direct-task-editing/di.config';
|
|
78
|
-
import { ActivityNode, Icon, TaskNode, WeightedEdge } from './model';
|
|
44
|
+
import { ActivityNode, CategoryNode, Icon, TaskNode, WeightedEdge } from './model';
|
|
79
45
|
import { IconView, WorkflowEdgeView } from './workflow-views';
|
|
80
46
|
|
|
81
47
|
const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
82
48
|
rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
|
|
83
49
|
rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
|
|
84
|
-
bind(GLSP_TYPES.IMovementRestrictor).to(NoOverlapMovmentRestrictor).inSingletonScope();
|
|
85
50
|
bind(TYPES.ISnapper).to(GridSnapper);
|
|
86
51
|
bind(TYPES.ICommandPaletteActionProvider).to(RevealNamedElementActionProvider);
|
|
87
52
|
bind(TYPES.IContextMenuItemProvider).to(DeleteElementContextMenuItemProvider);
|
|
@@ -101,52 +66,16 @@ const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind
|
|
|
101
66
|
configureModelElement(context, 'activityNode:decision', ActivityNode, DiamondNodeView);
|
|
102
67
|
configureModelElement(context, 'activityNode:fork', ActivityNode, RectangularNodeView);
|
|
103
68
|
configureModelElement(context, 'activityNode:join', ActivityNode, RectangularNodeView);
|
|
69
|
+
|
|
70
|
+
configureModelElement(context, 'category', CategoryNode, RoundedCornerNodeView);
|
|
71
|
+
configureModelElement(context, 'struct', SCompartment, StructureCompartmentView);
|
|
104
72
|
});
|
|
105
73
|
|
|
106
74
|
export default function createContainer(widgetId: string): Container {
|
|
107
|
-
const container =
|
|
108
|
-
|
|
109
|
-
container.load(
|
|
110
|
-
defaultModule,
|
|
111
|
-
defaultGLSPModule,
|
|
112
|
-
glspMouseToolModule,
|
|
113
|
-
validationModule,
|
|
114
|
-
glspSelectModule,
|
|
115
|
-
boundsModule,
|
|
116
|
-
glspViewportModule,
|
|
117
|
-
toolsModule,
|
|
118
|
-
glspHoverModule,
|
|
119
|
-
fadeModule,
|
|
120
|
-
exportModule,
|
|
121
|
-
expandModule,
|
|
122
|
-
openModule,
|
|
123
|
-
buttonModule,
|
|
124
|
-
modelSourceModule,
|
|
125
|
-
labelEditUiModule,
|
|
126
|
-
glspEditLabelModule,
|
|
127
|
-
workflowDiagramModule,
|
|
128
|
-
toolFeedbackModule,
|
|
129
|
-
modelHintsModule,
|
|
130
|
-
glspContextMenuModule,
|
|
131
|
-
glspServerCopyPasteModule,
|
|
132
|
-
modelSourceWatcherModule,
|
|
133
|
-
glspCommandPaletteModule,
|
|
134
|
-
paletteModule,
|
|
135
|
-
routingModule,
|
|
136
|
-
glspDecorationModule,
|
|
137
|
-
edgeLayoutModule,
|
|
138
|
-
zorderModule,
|
|
139
|
-
edgeIntersectionModule,
|
|
140
|
-
layoutCommandsModule,
|
|
141
|
-
directTaskEditor,
|
|
142
|
-
navigationModule,
|
|
143
|
-
markerNavigatorModule
|
|
144
|
-
);
|
|
145
|
-
|
|
75
|
+
const container = createClientContainer(workflowDiagramModule, directTaskEditor);
|
|
146
76
|
overrideViewerOptions(container, {
|
|
147
77
|
baseDiv: widgetId,
|
|
148
78
|
hiddenDiv: widgetId + '_hidden'
|
|
149
79
|
});
|
|
150
|
-
|
|
151
80
|
return container;
|
|
152
81
|
}
|