@eclipse-glsp/client 0.10.0-next.b3a810f.172 → 0.10.0-next.c1d28ed.179
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/css/decoration.css +5 -1
- package/css/glsp-sprotty.css +39 -0
- package/css/tool-palette.css +2 -2
- package/lib/base/container-modules.js +8 -8
- package/lib/base/container-modules.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +1 -3
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +6 -11
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/model/update-model-command.d.ts +14 -7
- package/lib/base/model/update-model-command.d.ts.map +1 -1
- package/lib/base/model/update-model-command.js +31 -41
- package/lib/base/model/update-model-command.js.map +1 -1
- package/lib/features/change-bounds/snap.d.ts +18 -2
- package/lib/features/change-bounds/snap.d.ts.map +1 -1
- package/lib/features/change-bounds/snap.js +19 -8
- package/lib/features/change-bounds/snap.js.map +1 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts +5 -7
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +1 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js +7 -14
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
- package/lib/features/layout/di.config.d.ts.map +1 -1
- package/lib/features/layout/di.config.js +1 -2
- package/lib/features/layout/di.config.js.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.d.ts +0 -1
- package/lib/features/mouse-tool/mouse-tool.d.ts.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.js +9 -5
- package/lib/features/mouse-tool/mouse-tool.js.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.js +1 -1
- package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +3 -1
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +62 -0
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/source-model-watcher/di.config.d.ts +4 -0
- package/lib/features/{model-source-watcher → source-model-watcher}/di.config.d.ts.map +1 -1
- package/lib/features/{model-source-watcher → source-model-watcher}/di.config.js +4 -4
- package/lib/features/{model-source-watcher → source-model-watcher}/di.config.js.map +1 -1
- package/lib/features/{model-source-watcher/model-source-changed-action-handler.d.ts → source-model-watcher/source-model-changed-action-handler.d.ts} +9 -9
- package/lib/features/{model-source-watcher/model-source-changed-action-handler.d.ts.map → source-model-watcher/source-model-changed-action-handler.d.ts.map} +1 -1
- package/lib/features/{model-source-watcher/model-source-changed-action-handler.js → source-model-watcher/source-model-changed-action-handler.js} +19 -19
- package/lib/features/{model-source-watcher/model-source-changed-action-handler.js.map → source-model-watcher/source-model-changed-action-handler.js.map} +1 -1
- package/lib/features/validation/issue-marker.d.ts +10 -5
- package/lib/features/validation/issue-marker.d.ts.map +1 -1
- package/lib/features/validation/issue-marker.js +12 -4
- package/lib/features/validation/issue-marker.js.map +1 -1
- package/lib/features/validation/validate.d.ts +1 -0
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +10 -3
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -11
- package/lib/index.js.map +1 -1
- package/lib/lib/model.d.ts +1 -1
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +3 -3
- package/lib/lib/model.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +3 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +30 -0
- package/lib/views/glsp-projection-view.d.ts.map +1 -0
- package/lib/views/glsp-projection-view.js +142 -0
- package/lib/views/glsp-projection-view.js.map +1 -0
- package/lib/views/index.d.ts +1 -0
- package/lib/views/index.d.ts.map +1 -1
- package/lib/views/index.js +1 -0
- package/lib/views/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base/container-modules.ts +2 -2
- package/src/base/editor-context-service.ts +7 -9
- package/src/base/model/update-model-command.ts +48 -34
- package/src/features/change-bounds/snap.ts +13 -9
- package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +19 -25
- package/src/features/layout/di.config.ts +6 -2
- package/src/features/mouse-tool/mouse-tool.ts +8 -6
- package/src/features/navigation/navigation-target-resolver.ts +1 -1
- package/src/features/select/select-mouse-listener.ts +81 -1
- package/src/features/{model-source-watcher → source-model-watcher}/di.config.ts +5 -5
- package/src/features/{model-source-watcher/model-source-changed-action-handler.ts → source-model-watcher/source-model-changed-action-handler.ts} +12 -12
- package/src/features/validation/issue-marker.ts +22 -12
- package/src/features/validation/validate.ts +11 -4
- package/src/index.ts +3 -3
- package/src/lib/model.ts +1 -1
- package/src/views/base-view-module.ts +5 -1
- package/src/views/glsp-projection-view.tsx +166 -0
- package/src/views/index.ts +2 -0
- package/lib/features/model-source-watcher/di.config.d.ts +0 -4
package/css/decoration.css
CHANGED
|
@@ -23,16 +23,20 @@
|
|
|
23
23
|
|
|
24
24
|
.sprotty-issue-background {
|
|
25
25
|
fill: var(--glsp-issue-background);
|
|
26
|
+
background-color: var(--glsp-issue-background);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.sprotty-issue.sprotty-error {
|
|
29
30
|
fill: var(--glsp-error-foreground);
|
|
31
|
+
background-color: var(--glsp-error-foreground);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.sprotty-issue.sprotty-warning {
|
|
33
35
|
fill: var(--glsp-warning-foreground);
|
|
36
|
+
background-color: var(--glsp-warning-foreground);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
.sprotty-issue.sprotty-info {
|
|
37
40
|
fill: var(--glsp-info-foreground);
|
|
38
|
-
|
|
41
|
+
background-color: var(--glsp-info-foreground);
|
|
42
|
+
}
|
package/css/glsp-sprotty.css
CHANGED
|
@@ -215,3 +215,42 @@ text {
|
|
|
215
215
|
font-size: 8pt;
|
|
216
216
|
text-anchor: middle;
|
|
217
217
|
}
|
|
218
|
+
|
|
219
|
+
.glsp-projection {
|
|
220
|
+
width: 40%;
|
|
221
|
+
opacity: 1;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.sprotty-projection-bar.vertical.bordered-projection-bar {
|
|
225
|
+
width: var(--theia-scrollbar-rail-width);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.sprotty-projection-bar.horizontal.bordered-projection-bar {
|
|
229
|
+
height: var(--theia-scrollbar-rail-width);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.projection-scroll-bar {
|
|
233
|
+
transition: opacity 0.8s linear;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.mouse-enter .projection-scroll-bar {
|
|
237
|
+
opacity: 0.3;
|
|
238
|
+
background: transparent;
|
|
239
|
+
background-color: #aaa;
|
|
240
|
+
z-index: 1;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.mouse-leave .projection-scroll-bar {
|
|
244
|
+
opacity: 0;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
background: transparent;
|
|
247
|
+
background-color: #aaa;
|
|
248
|
+
z-index: 1;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.bordered-projection-bar {
|
|
252
|
+
border-left: 1px solid rgba(212, 212, 212, 0.2);
|
|
253
|
+
border-top: 1px solid rgba(212, 212, 212, 0.2);
|
|
254
|
+
fill: transparent;
|
|
255
|
+
width: var(--theia-scrollbar-rail-width);
|
|
256
|
+
}
|
package/css/tool-palette.css
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/* Css for main container */
|
|
18
18
|
.tool-palette {
|
|
19
19
|
position: absolute;
|
|
20
|
-
right:
|
|
20
|
+
right: 40px;
|
|
21
21
|
top: 25px;
|
|
22
22
|
text-align: center;
|
|
23
23
|
width: 225px;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
|
|
141
141
|
.minimize-palette-button {
|
|
142
142
|
position: absolute;
|
|
143
|
-
right:
|
|
143
|
+
right: 20px;
|
|
144
144
|
top: 35px;
|
|
145
145
|
z-index: 1000;
|
|
146
146
|
}
|
|
@@ -26,10 +26,10 @@ const di_config_5 = require("../features/edit-label/di.config");
|
|
|
26
26
|
const di_config_6 = require("../features/hints/di.config");
|
|
27
27
|
const di_config_7 = require("../features/hover/di.config");
|
|
28
28
|
const di_config_8 = require("../features/layout/di.config");
|
|
29
|
-
const di_config_9 = require("../features/
|
|
30
|
-
const di_config_10 = require("../features/
|
|
31
|
-
const di_config_11 = require("../features/
|
|
32
|
-
const di_config_12 = require("../features/
|
|
29
|
+
const di_config_9 = require("../features/mouse-tool/di.config");
|
|
30
|
+
const di_config_10 = require("../features/navigation/di.config");
|
|
31
|
+
const di_config_11 = require("../features/select/di.config");
|
|
32
|
+
const di_config_12 = require("../features/source-model-watcher/di.config");
|
|
33
33
|
const di_config_13 = require("../features/tool-feedback/di.config");
|
|
34
34
|
const di_config_14 = require("../features/tool-palette/di.config");
|
|
35
35
|
const di_config_15 = require("../features/tools/di.config");
|
|
@@ -51,8 +51,8 @@ exports.DEFAULT_MODULES = [
|
|
|
51
51
|
di_config_4.default,
|
|
52
52
|
di_config_5.default,
|
|
53
53
|
di_config_7.default,
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
di_config_9.default,
|
|
55
|
+
di_config_11.default,
|
|
56
56
|
di_config_3.glspServerCopyPasteModule,
|
|
57
57
|
di_config_17.default,
|
|
58
58
|
sprotty_1.labelEditUiModule,
|
|
@@ -60,8 +60,8 @@ exports.DEFAULT_MODULES = [
|
|
|
60
60
|
di_config_16.markerNavigatorModule,
|
|
61
61
|
di_config_6.default,
|
|
62
62
|
sprotty_1.modelSourceModule,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
di_config_12.default,
|
|
64
|
+
di_config_10.navigationModule,
|
|
65
65
|
sprotty_1.openModule,
|
|
66
66
|
di_config_14.default,
|
|
67
67
|
sprotty_1.routingModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAAuD;AACvD,qCAciB;AACjB,qEAA6E;AAC7E,kEAAuE;AACvE,gEAA6E;AAC7E,gEAAoE;AACpE,gEAAmE;AACnE,2DAA2D;AAC3D,2DAA0D;AAC1D,4DAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAAuD;AACvD,qCAciB;AACjB,qEAA6E;AAC7E,kEAAuE;AACvE,gEAA6E;AAC7E,gEAAoE;AACpE,gEAAmE;AACnE,2DAA2D;AAC3D,2DAA0D;AAC1D,4DAAwD;AACxD,gEAAmE;AACnE,iEAAoE;AACpE,6DAA4D;AAC5D,2EAAkF;AAClF,oEAAqE;AACrE,mEAAmE;AACnE,4DAA+F;AAC/F,iEAA2F;AAC3F,+DAAgE;AAChE,4CAA4C;AAE/B,QAAA,eAAe,GAAG;IAC3B,uBAAa;IACb,oBAAiB;IACjB,sBAAY;IACZ,sBAAY;IACZ,gCAAsB;IACtB,0BAAgB;IAChB,sBAAY;IACZ,sBAAY;IACZ,oBAAU;IACV,mBAAwB;IACxB,mBAAqB;IACrB,mBAAoB;IACpB,mBAAmB;IACnB,mBAAe;IACf,mBAAmB;IACnB,oBAAgB;IAChB,qCAAyB;IACzB,oBAAkB;IAClB,2BAAiB;IACjB,mBAAY;IACZ,kCAAqB;IACrB,mBAAgB;IAChB,2BAAiB;IACjB,oBAAwB;IACxB,6BAAgB;IAChB,oBAAU;IACV,oBAAiB;IACjB,uBAAa;IACb,oBAAkB;IAClB,wBAAW;IACX,gDAAmC;IACnC,6BAAgB;IAChB,sBAAY;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,qBAAqB,CAAC,GAAG,OAA0B;IAC/D,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,SAAS,CAAC,IAAI,CAAC,GAAG,uBAAe,EAAE,GAAG,OAAO,CAAC,CAAC;IAC/C,OAAO,SAAS,CAAC;AACrB,CAAC;AAJD,sDAIC"}
|
|
@@ -37,15 +37,13 @@ export declare class EditorContextService implements IActionHandler {
|
|
|
37
37
|
protected editModeListeners: EditModeListener[];
|
|
38
38
|
protected modelSourceProvider: () => Promise<ModelSource>;
|
|
39
39
|
protected _editMode: string;
|
|
40
|
-
protected modelSource: ModelSource | undefined;
|
|
41
|
-
initialize(): Promise<void>;
|
|
42
40
|
register(editModeListener: EditModeListener): void;
|
|
43
41
|
deregister(editModeListener: EditModeListener): void;
|
|
44
42
|
get(args?: Args): EditorContext;
|
|
45
43
|
getWithSelection(selectedElementIds: string[], args?: Args): EditorContext;
|
|
46
44
|
handle(action: Action): void;
|
|
47
45
|
protected notifiyEditModeListeners(oldValue: string): void;
|
|
48
|
-
|
|
46
|
+
getSourceUri(): Promise<string | undefined>;
|
|
49
47
|
get editMode(): string;
|
|
50
48
|
get modelRoot(): Readonly<SModelRoot>;
|
|
51
49
|
get selectedElements(): Readonly<SModelElement>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAyB,aAAa,EAA6B,MAAM,wBAAwB,CAAC;AAEvH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAIxE,MAAM,WAAW,gBAAgB;IAC7B,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AAI;IAIlD,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIpD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ/B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ1E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ5B,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIpD,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQjD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEpC;IAED,IAAI,gBAAgB,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE,CAEhD;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ;AAED,oBAAY,4BAA4B,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -47,9 +47,6 @@ let EditorContextService = class EditorContextService {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
this.editModeListeners = [];
|
|
49
49
|
}
|
|
50
|
-
async initialize() {
|
|
51
|
-
this.modelSource = await this.modelSourceProvider();
|
|
52
|
-
}
|
|
53
50
|
register(editModeListener) {
|
|
54
51
|
(0, protocol_1.distinctAdd)(this.editModeListeners, editModeListener);
|
|
55
52
|
}
|
|
@@ -80,8 +77,12 @@ let EditorContextService = class EditorContextService {
|
|
|
80
77
|
notifiyEditModeListeners(oldValue) {
|
|
81
78
|
this.editModeListeners.forEach(listener => listener.editModeChanged(oldValue, this.editMode));
|
|
82
79
|
}
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
async getSourceUri() {
|
|
81
|
+
const modelSource = await this.modelSourceProvider();
|
|
82
|
+
if ((0, source_uri_aware_1.isSourceUriAware)(modelSource)) {
|
|
83
|
+
return modelSource.sourceURI;
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
85
86
|
}
|
|
86
87
|
get editMode() {
|
|
87
88
|
return this._editMode;
|
|
@@ -113,12 +114,6 @@ __decorate([
|
|
|
113
114
|
(0, inversify_1.inject)(types_1.TYPES.ModelSourceProvider),
|
|
114
115
|
__metadata("design:type", Function)
|
|
115
116
|
], EditorContextService.prototype, "modelSourceProvider", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, inversify_1.postConstruct)(),
|
|
118
|
-
__metadata("design:type", Function),
|
|
119
|
-
__metadata("design:paramtypes", []),
|
|
120
|
-
__metadata("design:returntype", Promise)
|
|
121
|
-
], EditorContextService.prototype, "initialize", null);
|
|
122
117
|
EditorContextService = __decorate([
|
|
123
118
|
(0, inversify_1.injectable)()
|
|
124
119
|
], EditorContextService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuH;AACvH,
|
|
1
|
+
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuH;AACvH,yCAAsE;AACtE,qCAAuG;AACvG,4EAAwE;AACxE,yDAAsD;AACtD,mCAAgC;AAMhC;;;;;;;;;;;GAWG;AAEH,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAAjC;QASc,sBAAiB,GAAuB,EAAE,CAAC;IAkEzD,CAAC;IA3DG,QAAQ,CAAC,gBAAkC;QACvC,IAAA,sBAAW,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU,CAAC,gBAAkC;QACzC,IAAA,iBAAM,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACrD,CAAC;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AAmB,EAAE,CAAC;IACvD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;CACJ,CAAA;AAzEG;IADC,IAAA,kBAAM,EAAC,aAAK,CAAC,gBAAgB,CAAC;8BACH,oCAAgB;8DAAC;AAG7C;IADC,IAAA,kBAAM,EAAC,8BAAoB,CAAC;8BACG,8BAAoB;kEAAC;AAIrD;IAFC,IAAA,uBAAW,EAAC,aAAK,CAAC,iBAAiB,CAAC;IACpC,IAAA,oBAAQ,GAAE;;+DAC0C;AAGrD;IADC,IAAA,kBAAM,EAAC,aAAK,CAAC,mBAAmB,CAAC;;iEACwB;AAZjD,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA2EhC;AA3EY,oDAAoB"}
|
|
@@ -14,8 +14,14 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, UpdateModelAction } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { ActionHandlerRegistry, Command, CommandExecutionContext, CommandReturn, IActionHandler, ILogger, SModelRoot, UpdateModelCommand } from 'sprotty';
|
|
17
|
+
import { ActionHandlerRegistry, Animation, Command, CommandExecutionContext, CommandReturn, IActionHandler, ILogger, SModelRoot, UpdateAnimationData, UpdateModelCommand } from 'sprotty';
|
|
18
18
|
import { IFeedbackActionDispatcher } from '../../features/tool-feedback/feedback-action-dispatcher';
|
|
19
|
+
import { FeedbackCommand } from '../../features/tool-feedback/model';
|
|
20
|
+
/**
|
|
21
|
+
* ActionHandler that transforms a {@link SetModelAction} into an {@link UpdateModelAction} that can be handled
|
|
22
|
+
* by the {@link FeedbackAwareUpdateModelCommand}. This can be done because in sprotty an {@link UpdateModelCommand} and
|
|
23
|
+
* a {@link SetModelCommand} have the same behavior of no model is present yet.
|
|
24
|
+
*/
|
|
19
25
|
export declare class SetModelActionHandler implements IActionHandler {
|
|
20
26
|
handle(action: Action): Action | void;
|
|
21
27
|
}
|
|
@@ -23,18 +29,19 @@ export interface SModelRootListener {
|
|
|
23
29
|
modelRootChanged(root: Readonly<SModelRoot>): void;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
|
-
* A special
|
|
27
|
-
* feedback to the `newRoot` before performing the update
|
|
32
|
+
* A special {@link UpdateModelCommand} that retrieves all registered {@link Action}s from the {@link IFeedbackActionDispatcher}
|
|
33
|
+
* (if present) and applies their feedback to the `newRoot` before performing the update. This enables persistent client-side feedback
|
|
34
|
+
* across model updates initiated by the GLSP server.
|
|
28
35
|
*/
|
|
29
36
|
export declare class FeedbackAwareUpdateModelCommand extends UpdateModelCommand {
|
|
30
37
|
protected logger: ILogger;
|
|
31
|
-
protected
|
|
32
|
-
protected actionHandlerRegistryProvider: () => Promise<ActionHandlerRegistry>;
|
|
38
|
+
protected feedbackActionDispatcher: IFeedbackActionDispatcher;
|
|
33
39
|
protected modelRootListeners: SModelRootListener[];
|
|
34
40
|
protected actionHandlerRegistry?: ActionHandlerRegistry;
|
|
35
|
-
constructor(action: UpdateModelAction);
|
|
36
|
-
protected initialize(): void;
|
|
41
|
+
constructor(action: UpdateModelAction, actionHandlerRegistryProvider: () => Promise<ActionHandlerRegistry>);
|
|
37
42
|
protected performUpdate(oldRoot: SModelRoot, newRoot: SModelRoot, context: CommandExecutionContext): CommandReturn;
|
|
38
43
|
protected getFeedbackCommands(registry: ActionHandlerRegistry): Command[];
|
|
44
|
+
protected getPriority(command: Partial<FeedbackCommand>): number;
|
|
45
|
+
protected createAnimations(data: UpdateAnimationData, root: SModelRoot, context: CommandExecutionContext): Animation[];
|
|
39
46
|
}
|
|
40
47
|
//# sourceMappingURL=update-model-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-model-command.d.ts","sourceRoot":"","sources":["../../../src/base/model/update-model-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"update-model-command.d.ts","sourceRoot":"","sources":["../../../src/base/model/update-model-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAA+B,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhG,OAAO,EACH,qBAAqB,EACrB,SAAS,EACT,OAAO,EAEP,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,OAAO,EAEP,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE;;;;GAIG;AACH,qBACa,qBAAsB,YAAW,cAAc;IACxD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAKxC;AAED,MAAM,WAAW,kBAAkB;IAC/B,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;CACtD;AAED;;;;GAIG;AACH,qBACa,+BAAgC,SAAQ,kBAAkB;IAEnE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAI1B,SAAS,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;IAI9D,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,CAAM;IAExD,SAAS,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;gBAG9B,MAAM,EAAE,iBAAiB,EAE/C,6BAA6B,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC;cAMpD,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAiB3H,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,EAAE;IAazE,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,MAAM;cAM7C,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,uBAAuB,GAAG,SAAS,EAAE;CAIlI"}
|
|
@@ -31,10 +31,12 @@ exports.FeedbackAwareUpdateModelCommand = exports.SetModelActionHandler = void 0
|
|
|
31
31
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
32
32
|
const inversify_1 = require("inversify");
|
|
33
33
|
const sprotty_1 = require("sprotty");
|
|
34
|
-
const model_1 = require("../../features/tool-feedback/model");
|
|
35
34
|
const types_1 = require("../types");
|
|
36
|
-
|
|
37
|
-
*
|
|
35
|
+
/**
|
|
36
|
+
* ActionHandler that transforms a {@link SetModelAction} into an {@link UpdateModelAction} that can be handled
|
|
37
|
+
* by the {@link FeedbackAwareUpdateModelCommand}. This can be done because in sprotty an {@link UpdateModelCommand} and
|
|
38
|
+
* a {@link SetModelCommand} have the same behavior of no model is present yet.
|
|
39
|
+
*/
|
|
38
40
|
let SetModelActionHandler = class SetModelActionHandler {
|
|
39
41
|
handle(action) {
|
|
40
42
|
if (protocol_1.SetModelAction.is(action)) {
|
|
@@ -47,29 +49,21 @@ SetModelActionHandler = __decorate([
|
|
|
47
49
|
], SetModelActionHandler);
|
|
48
50
|
exports.SetModelActionHandler = SetModelActionHandler;
|
|
49
51
|
/**
|
|
50
|
-
* A special
|
|
51
|
-
* feedback to the `newRoot` before performing the update
|
|
52
|
+
* A special {@link UpdateModelCommand} that retrieves all registered {@link Action}s from the {@link IFeedbackActionDispatcher}
|
|
53
|
+
* (if present) and applies their feedback to the `newRoot` before performing the update. This enables persistent client-side feedback
|
|
54
|
+
* across model updates initiated by the GLSP server.
|
|
52
55
|
*/
|
|
53
56
|
let FeedbackAwareUpdateModelCommand = class FeedbackAwareUpdateModelCommand extends sprotty_1.UpdateModelCommand {
|
|
54
|
-
constructor(action) {
|
|
57
|
+
constructor(action, actionHandlerRegistryProvider) {
|
|
55
58
|
super(Object.assign({ animate: true }, action));
|
|
56
59
|
this.modelRootListeners = [];
|
|
57
|
-
|
|
58
|
-
initialize() {
|
|
59
|
-
this.actionHandlerRegistryProvider().then(registry => (this.actionHandlerRegistry = registry));
|
|
60
|
+
actionHandlerRegistryProvider().then(registry => (this.actionHandlerRegistry = registry));
|
|
60
61
|
}
|
|
61
62
|
performUpdate(oldRoot, newRoot, context) {
|
|
62
63
|
if (this.feedbackActionDispatcher && this.actionHandlerRegistry) {
|
|
63
|
-
// Create a temporary context
|
|
64
|
+
// Create a temporary context which defines the `newRoot` as `root`
|
|
64
65
|
// This way we do not corrupt the redo/undo behavior of the super class
|
|
65
|
-
const tempContext = {
|
|
66
|
-
root: newRoot,
|
|
67
|
-
duration: context.duration,
|
|
68
|
-
logger: context.logger,
|
|
69
|
-
modelChanged: context.modelChanged,
|
|
70
|
-
modelFactory: context.modelFactory,
|
|
71
|
-
syncer: context.syncer
|
|
72
|
-
};
|
|
66
|
+
const tempContext = Object.assign(Object.assign({}, context), { root: newRoot });
|
|
73
67
|
const feedbackCommands = this.getFeedbackCommands(this.actionHandlerRegistry);
|
|
74
68
|
feedbackCommands.forEach(command => command.execute(tempContext));
|
|
75
69
|
}
|
|
@@ -79,13 +73,24 @@ let FeedbackAwareUpdateModelCommand = class FeedbackAwareUpdateModelCommand exte
|
|
|
79
73
|
getFeedbackCommands(registry) {
|
|
80
74
|
const result = [];
|
|
81
75
|
this.feedbackActionDispatcher.getRegisteredFeedback().forEach(action => {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
const commands = registry
|
|
77
|
+
.get(action.kind)
|
|
78
|
+
.filter((0, protocol_1.toTypeGuard)(sprotty_1.CommandActionHandler))
|
|
79
|
+
.map(handler => handler.handle(action));
|
|
80
|
+
result.push(...commands);
|
|
86
81
|
});
|
|
87
|
-
// sort commands
|
|
88
|
-
return result.sort((a, b) => getPriority(b) - getPriority(a));
|
|
82
|
+
// sort commands descanting by priority
|
|
83
|
+
return result.sort((a, b) => this.getPriority(b) - this.getPriority(a));
|
|
84
|
+
}
|
|
85
|
+
getPriority(command) {
|
|
86
|
+
var _a;
|
|
87
|
+
return (_a = command.priority) !== null && _a !== void 0 ? _a : 0;
|
|
88
|
+
}
|
|
89
|
+
// Override the `createAnimations` implementation and remove the animation for edge morphing. Otherwise routing & reconnect
|
|
90
|
+
// handles flicker after each server update.
|
|
91
|
+
createAnimations(data, root, context) {
|
|
92
|
+
const animations = super.createAnimations(data, root, context);
|
|
93
|
+
return animations.filter(animation => !(animation instanceof sprotty_1.MorphEdgesAnimation));
|
|
89
94
|
}
|
|
90
95
|
};
|
|
91
96
|
__decorate([
|
|
@@ -97,31 +102,16 @@ __decorate([
|
|
|
97
102
|
(0, inversify_1.optional)(),
|
|
98
103
|
__metadata("design:type", Object)
|
|
99
104
|
], FeedbackAwareUpdateModelCommand.prototype, "feedbackActionDispatcher", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, inversify_1.inject)(types_1.TYPES.ActionHandlerRegistryProvider),
|
|
102
|
-
__metadata("design:type", Function)
|
|
103
|
-
], FeedbackAwareUpdateModelCommand.prototype, "actionHandlerRegistryProvider", void 0);
|
|
104
105
|
__decorate([
|
|
105
106
|
(0, inversify_1.multiInject)(types_1.TYPES.SModelRootListener),
|
|
106
107
|
(0, inversify_1.optional)(),
|
|
107
108
|
__metadata("design:type", Array)
|
|
108
109
|
], FeedbackAwareUpdateModelCommand.prototype, "modelRootListeners", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, inversify_1.postConstruct)(),
|
|
111
|
-
__metadata("design:type", Function),
|
|
112
|
-
__metadata("design:paramtypes", []),
|
|
113
|
-
__metadata("design:returntype", void 0)
|
|
114
|
-
], FeedbackAwareUpdateModelCommand.prototype, "initialize", null);
|
|
115
110
|
FeedbackAwareUpdateModelCommand = __decorate([
|
|
116
111
|
(0, inversify_1.injectable)(),
|
|
117
112
|
__param(0, (0, inversify_1.inject)(types_1.TYPES.Action)),
|
|
118
|
-
|
|
113
|
+
__param(1, (0, inversify_1.inject)(types_1.TYPES.ActionHandlerRegistryProvider)),
|
|
114
|
+
__metadata("design:paramtypes", [Object, Function])
|
|
119
115
|
], FeedbackAwareUpdateModelCommand);
|
|
120
116
|
exports.FeedbackAwareUpdateModelCommand = FeedbackAwareUpdateModelCommand;
|
|
121
|
-
function getPriority(command) {
|
|
122
|
-
if (command instanceof model_1.FeedbackCommand) {
|
|
123
|
-
return command.priority;
|
|
124
|
-
}
|
|
125
|
-
return 0;
|
|
126
|
-
}
|
|
127
117
|
//# sourceMappingURL=update-model-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-model-command.js","sourceRoot":"","sources":["../../../src/base/model/update-model-command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"update-model-command.js","sourceRoot":"","sources":["../../../src/base/model/update-model-command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAgG;AAChG,yCAAsE;AACtE,qCAaiB;AAGjB,oCAAiC;AAEjC;;;;GAIG;AAEH,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAC9B,MAAM,CAAC,MAAc;QACjB,IAAI,yBAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO,4BAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SACvE;IACL,CAAC;CACJ,CAAA;AANY,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAMjC;AANY,sDAAqB;AAYlC;;;;GAIG;AAEH,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,4BAAkB;IAcnE,YAC0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|
import { Point, Writable } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { ISnapper, SModelElement } from 'sprotty';
|
|
18
|
+
/**
|
|
19
|
+
* A {@link ISnapper} implementation that snaps all elements onto a fixed gride size.
|
|
20
|
+
* The default grid size is 10x10 pixel.
|
|
21
|
+
* To configure a custom grid size bind the `TYPES.ISnapper` service identifier
|
|
22
|
+
* to constant value, e.g:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* bind(TYPES.ISnapper).toConstantValue(new GridSnapper({x:25 ,y:25 }));
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
18
28
|
export declare class GridSnapper implements ISnapper {
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
grid: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
constructor(grid?: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
});
|
|
21
37
|
snap(position: Point, element: SModelElement): Point;
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAuB,QAAQ,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;AAEnF,qBACa,WAAY,YAAW,QAAQ;
|
|
1
|
+
{"version":3,"file":"snap.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAuB,QAAQ,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;AAEnF;;;;;;;;;GASG;AACH,qBACa,WAAY,YAAW,QAAQ;IACrB,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;gBAA9B,IAAI,GAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAqB;IAEpE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;CAMvD;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAIjB,SAAS,CAAC,OAAO,CAAC;IAH9B,SAAS,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IACnC,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAkB;gBAEpC,OAAO,CAAC,sBAAU;IAExC;;;;OAIG;IACI,sBAAsB,CAAC,aAAa,EAAE,KAAK,GAAG,IAAI;IAIzD;;;OAGG;IACI,2BAA2B,IAAI,OAAO;IAI7C;;;OAGG;IACI,aAAa,IAAI,IAAI;IAK5B;;;;;;;OAOG;IACI,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS;IA8B7G,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAG,KAAK;CAGlF"}
|
|
@@ -5,26 +5,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.PointPositionUpdater = exports.GridSnapper = void 0;
|
|
10
13
|
const inversify_1 = require("inversify");
|
|
11
14
|
const sprotty_1 = require("sprotty");
|
|
15
|
+
/**
|
|
16
|
+
* A {@link ISnapper} implementation that snaps all elements onto a fixed gride size.
|
|
17
|
+
* The default grid size is 10x10 pixel.
|
|
18
|
+
* To configure a custom grid size bind the `TYPES.ISnapper` service identifier
|
|
19
|
+
* to constant value, e.g:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* bind(TYPES.ISnapper).toConstantValue(new GridSnapper({x:25 ,y:25 }));
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
12
25
|
let GridSnapper = class GridSnapper {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
get gridY() {
|
|
17
|
-
return 10;
|
|
26
|
+
constructor(grid = { x: 10, y: 10 }) {
|
|
27
|
+
this.grid = grid;
|
|
18
28
|
}
|
|
19
29
|
snap(position, element) {
|
|
20
30
|
return {
|
|
21
|
-
x: Math.round(position.x / this.
|
|
22
|
-
y: Math.round(position.y / this.
|
|
31
|
+
x: Math.round(position.x / this.grid.x) * this.grid.x,
|
|
32
|
+
y: Math.round(position.y / this.grid.y) * this.grid.y
|
|
23
33
|
};
|
|
24
34
|
}
|
|
25
35
|
};
|
|
26
36
|
GridSnapper = __decorate([
|
|
27
|
-
(0, inversify_1.injectable)()
|
|
37
|
+
(0, inversify_1.injectable)(),
|
|
38
|
+
__metadata("design:paramtypes", [Object])
|
|
28
39
|
], GridSnapper);
|
|
29
40
|
exports.GridSnapper = GridSnapper;
|
|
30
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.js","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snap.js","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":";;;;;;;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S,CAAC;IACrB,CAAC;IAES,IAAI,CAAC,QAAe,EAAE,OAAsB,EAAE,MAAe;QACnE,OAAO,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC5G,CAAC;CACJ;AAzED,oDAyEC"}
|
|
@@ -17,25 +17,23 @@ import { Action } from '@eclipse-glsp/protocol';
|
|
|
17
17
|
import { ContextMenuProviderRegistry, IContextMenuServiceProvider, MouseListener, SModelElement } from 'sprotty';
|
|
18
18
|
import { SelectionService } from '../select/selection-service';
|
|
19
19
|
export declare class SelectionServiceAwareContextMenuMouseListener extends MouseListener {
|
|
20
|
-
protected readonly contextMenuService
|
|
21
|
-
protected readonly menuProvider
|
|
20
|
+
protected readonly contextMenuService?: IContextMenuServiceProvider;
|
|
21
|
+
protected readonly menuProvider?: ContextMenuProviderRegistry;
|
|
22
22
|
protected selectionService: SelectionService;
|
|
23
23
|
/**
|
|
24
|
-
* Opens the context menu
|
|
24
|
+
* Opens the context menu.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
contextMenu(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
|
|
27
27
|
/**
|
|
28
28
|
* Opens the context menu.
|
|
29
29
|
*
|
|
30
|
-
* - query the element on the click-target
|
|
31
|
-
* - select the element
|
|
32
30
|
* - query the context menu service and the context menu elements
|
|
33
31
|
* - show the context menu
|
|
34
32
|
* - send a focus state change to indicate that the diagram becomes inactive, once the context menu is shown
|
|
35
33
|
*
|
|
36
34
|
* When the context menu is closed, we focus the diagram element again.
|
|
37
35
|
*/
|
|
38
|
-
protected openContextMenu(
|
|
36
|
+
protected openContextMenu(target: SModelElement, event: MouseEvent): Promise<Action>[];
|
|
39
37
|
protected focusEventTarget(event: MouseEvent): void;
|
|
40
38
|
}
|
|
41
39
|
//# sourceMappingURL=selection-service-aware-context-menu-mouse-listener.d.ts.map
|
package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBACa,6CAA8C,SAAQ,aAAa;IAG5E,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,2BAA2B,CAAC;IAIpE,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAG9D,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C;;OAEG;IACM,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;IAI5F;;;;;;;;OAQG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE;IActF,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAOtD"}
|
|
@@ -17,32 +17,25 @@ const types_1 = require("../../base/types");
|
|
|
17
17
|
const selection_service_1 = require("../select/selection-service");
|
|
18
18
|
let SelectionServiceAwareContextMenuMouseListener = class SelectionServiceAwareContextMenuMouseListener extends sprotty_1.MouseListener {
|
|
19
19
|
/**
|
|
20
|
-
* Opens the context menu
|
|
20
|
+
* Opens the context menu.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return this.openContextMenu(event, target);
|
|
25
|
-
}
|
|
26
|
-
return [];
|
|
22
|
+
contextMenu(target, event) {
|
|
23
|
+
return this.openContextMenu(target, event);
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
26
|
* Opens the context menu.
|
|
30
27
|
*
|
|
31
|
-
* - query the element on the click-target
|
|
32
|
-
* - select the element
|
|
33
28
|
* - query the context menu service and the context menu elements
|
|
34
29
|
* - show the context menu
|
|
35
30
|
* - send a focus state change to indicate that the diagram becomes inactive, once the context menu is shown
|
|
36
31
|
*
|
|
37
32
|
* When the context menu is closed, we focus the diagram element again.
|
|
38
33
|
*/
|
|
39
|
-
openContextMenu(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (selectableTarget) {
|
|
43
|
-
selectableTarget.selected = true;
|
|
44
|
-
this.selectionService.updateSelection(target.root, [selectableTarget.id], []);
|
|
34
|
+
openContextMenu(target, event) {
|
|
35
|
+
if (!this.contextMenuService || !this.menuProvider) {
|
|
36
|
+
return [];
|
|
45
37
|
}
|
|
38
|
+
const mousePosition = { x: event.x, y: event.y };
|
|
46
39
|
const result = Promise.all([this.contextMenuService(), this.menuProvider.getItems(target.root, mousePosition)])
|
|
47
40
|
.then(([menuService, menuItems]) => menuService.show(menuItems, mousePosition, () => this.focusEventTarget(event)))
|
|
48
41
|
.then(() => focus_change_action_1.FocusStateChangedAction.create(false));
|
package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,yCAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,yCAAyD;AACzD,qCAAiH;AACjH,gFAAiF;AACjF,4CAAyC;AACzC,mEAA+D;AAG/D,IAAa,6CAA6C,GAA1D,MAAa,6CAA8C,SAAQ,uBAAa;IAY5E;;OAEG;IACM,WAAW,CAAC,MAAqB,EAAE,KAAiB;QACzD,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;OAQG;IACO,eAAe,CAAC,MAAqB,EAAE,KAAiB;QAC9D,IAAI,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YAChD,OAAO,EAAE,CAAC;SACb;QAED,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;QAEjD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;aAC1G,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;aAClH,IAAI,CAAC,GAAW,EAAE,CAAC,6CAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/D,OAAO,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAES,gBAAgB,CAAC,KAAiB;QACxC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,YAAY,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACpF,MAAM,gBAAgB,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,gBAAgB,EAAE;YAClB,gBAAgB,CAAC,KAAK,EAAE,CAAC;SAC5B;IACL,CAAC;CACJ,CAAA;AA9CG;IAFC,IAAA,kBAAM,EAAC,aAAK,CAAC,2BAA2B,CAAC;IACzC,IAAA,oBAAQ,GAAE;;yFACyD;AAIpE;IAFC,IAAA,kBAAM,EAAC,aAAK,CAAC,4BAA4B,CAAC;IAC1C,IAAA,oBAAQ,GAAE;8BACuB,qCAA2B;mFAAC;AAG9D;IADC,IAAA,kBAAM,EAAC,aAAK,CAAC,gBAAgB,CAAC;8BACH,oCAAgB;uFAAC;AAVpC,6CAA6C;IADzD,IAAA,sBAAU,GAAE;GACA,6CAA6C,CAiDzD;AAjDY,sGAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/layout/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/layout/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAY5C,QAAA,MAAM,YAAY,iBAQhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
********************************************************************************/
|
|
18
18
|
const inversify_1 = require("inversify");
|
|
19
19
|
const sprotty_1 = require("sprotty");
|
|
20
|
-
const __1 = require("../..");
|
|
21
20
|
const freeform_layout_1 = require("./freeform-layout");
|
|
22
21
|
const hbox_layout_1 = require("./hbox-layout");
|
|
23
22
|
const layout_elements_action_1 = require("./layout-elements-action");
|
|
@@ -25,7 +24,7 @@ const vbox_layout_1 = require("./vbox-layout");
|
|
|
25
24
|
const layoutModule = new inversify_1.ContainerModule((bind, _unbind, isBound, rebind) => {
|
|
26
25
|
const context = { bind, isBound };
|
|
27
26
|
(0, sprotty_1.configureActionHandler)(context, layout_elements_action_1.ResizeElementsAction.KIND, layout_elements_action_1.ResizeElementsActionHandler);
|
|
28
|
-
(0, sprotty_1.configureActionHandler)(context, layout_elements_action_1.AlignElementsAction.KIND,
|
|
27
|
+
(0, sprotty_1.configureActionHandler)(context, layout_elements_action_1.AlignElementsAction.KIND, layout_elements_action_1.AlignElementsActionHandler);
|
|
29
28
|
rebind(sprotty_1.VBoxLayouter).to(vbox_layout_1.VBoxLayouterExt);
|
|
30
29
|
rebind(sprotty_1.HBoxLayouter).to(hbox_layout_1.HBoxLayouterExt);
|
|
31
30
|
(0, sprotty_1.configureLayout)({ bind, isBound }, freeform_layout_1.FreeFormLayouter.KIND, freeform_layout_1.FreeFormLayouter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/layout/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA4C;AAC5C,qCAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/layout/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA4C;AAC5C,qCAA8F;AAC9F,uDAAqD;AACrD,+CAAgD;AAChD,qEAKkC;AAClC,+CAAgD;AAEhD,MAAM,YAAY,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAClC,IAAA,gCAAsB,EAAC,OAAO,EAAE,6CAAoB,CAAC,IAAI,EAAE,oDAA2B,CAAC,CAAC;IACxF,IAAA,gCAAsB,EAAC,OAAO,EAAE,4CAAmB,CAAC,IAAI,EAAE,mDAA0B,CAAC,CAAC;IAEtF,MAAM,CAAC,sBAAY,CAAC,CAAC,EAAE,CAAC,6BAAe,CAAC,CAAC;IACzC,MAAM,CAAC,sBAAY,CAAC,CAAC,EAAE,CAAC,6BAAe,CAAC,CAAC;IACzC,IAAA,yBAAe,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,kCAAgB,CAAC,IAAI,EAAE,kCAAgB,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC"}
|