@eclipse-glsp/client 0.10.0-next.e5fcffe.169 → 1.1.0-next.fe0b297.182
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.d.ts.map +1 -1
- package/lib/base/container-modules.js +10 -9
- package/lib/base/container-modules.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +2 -3
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +11 -12
- 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/base/source-uri-aware.d.ts +2 -17
- package/lib/base/source-uri-aware.d.ts.map +1 -1
- package/lib/base/source-uri-aware.js +4 -6
- package/lib/base/source-uri-aware.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.d.ts +36 -6
- package/lib/features/change-bounds/movement-restrictor.d.ts.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +54 -39
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
- package/lib/features/change-bounds/snap.d.ts +20 -5
- 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/hover/hover.d.ts +1 -2
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +2 -15
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/layout/di.config.d.ts +2 -2
- package/lib/features/layout/di.config.d.ts.map +1 -1
- package/lib/features/layout/di.config.js +6 -5
- package/lib/features/layout/di.config.js.map +1 -1
- package/lib/features/layout/{layout-commands.d.ts → layout-elements-action.d.ts} +75 -57
- package/lib/features/layout/layout-elements-action.d.ts.map +1 -0
- package/lib/features/layout/{layout-commands.js → layout-elements-action.js} +153 -197
- package/lib/features/layout/layout-elements-action.js.map +1 -0
- package/lib/features/layout/layout-elements-action.spec.d.ts +3 -0
- package/lib/features/layout/layout-elements-action.spec.d.ts.map +1 -0
- package/lib/features/layout/{layout-commands.spec.js → layout-elements-action.spec.js} +63 -56
- package/lib/features/layout/layout-elements-action.spec.js.map +1 -0
- 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/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/select/selection-service.d.ts +12 -3
- package/lib/features/select/selection-service.d.ts.map +1 -1
- package/lib/features/select/selection-service.js +31 -45
- package/lib/features/select/selection-service.js.map +1 -1
- package/lib/features/select/selection-service.spec.js +1 -1
- package/lib/features/select/selection-service.spec.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/tool-feedback/change-bounds-tool-feedback.js +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +3 -2
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +13 -6
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tools/di.config.d.ts +9 -2
- package/lib/features/tools/di.config.d.ts.map +1 -1
- package/lib/features/tools/di.config.js +14 -3
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/features/tools/enable-default-tools-on-focus-loss.d.ts +26 -0
- package/lib/features/tools/enable-default-tools-on-focus-loss.d.ts.map +1 -0
- package/lib/features/tools/enable-default-tools-on-focus-loss.js +29 -0
- package/lib/features/tools/enable-default-tools-on-focus-loss.js.map +1 -0
- package/lib/features/validation/di.config.d.ts +0 -15
- package/lib/features/validation/di.config.d.ts.map +1 -1
- package/lib/features/validation/di.config.js +6 -4
- package/lib/features/validation/di.config.js.map +1 -1
- package/lib/features/validation/issue-marker.d.ts +11 -5
- package/lib/features/validation/issue-marker.d.ts.map +1 -1
- package/lib/features/validation/issue-marker.js +25 -5
- package/lib/features/validation/issue-marker.js.map +1 -1
- package/lib/features/validation/marker-navigator.d.ts +11 -17
- package/lib/features/validation/marker-navigator.d.ts.map +1 -1
- package/lib/features/validation/marker-navigator.js +32 -61
- package/lib/features/validation/marker-navigator.js.map +1 -1
- package/lib/features/validation/validate.d.ts +8 -19
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +29 -55
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -15
- 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/model-source/glsp-diagram-server.d.ts +1 -1
- package/lib/model-source/glsp-diagram-server.d.ts.map +1 -1
- package/lib/model-source/glsp-diagram-server.js +1 -1
- package/lib/model-source/glsp-diagram-server.js.map +1 -1
- package/lib/utils/layout-utils.d.ts +4 -20
- package/lib/utils/layout-utils.d.ts.map +1 -1
- package/lib/utils/layout-utils.js +1 -1
- package/lib/utils/layout-utils.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 +4 -4
- package/src/base/container-modules.ts +6 -5
- package/src/base/editor-context-service.ts +15 -7
- package/src/base/model/update-model-command.ts +48 -34
- package/src/base/source-uri-aware.ts +5 -4
- package/src/features/change-bounds/movement-restrictor.ts +73 -43
- package/src/features/change-bounds/snap.ts +15 -12
- package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +19 -25
- package/src/features/hover/hover.ts +2 -24
- package/src/features/layout/di.config.ts +12 -6
- package/src/features/layout/{layout-commands.spec.ts → layout-elements-action.spec.ts} +56 -48
- package/src/features/layout/{layout-commands.ts → layout-elements-action.ts} +195 -207
- package/src/features/mouse-tool/mouse-tool.ts +8 -6
- package/src/features/select/select-mouse-listener.ts +81 -1
- package/src/features/select/selection-service.spec.ts +1 -1
- package/src/features/select/selection-service.ts +37 -50
- 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/tool-feedback/change-bounds-tool-feedback.ts +1 -1
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +14 -6
- package/src/features/tools/di.config.ts +13 -2
- package/src/features/tools/enable-default-tools-on-focus-loss.ts +33 -0
- package/src/features/validation/di.config.ts +10 -7
- package/src/features/validation/issue-marker.ts +34 -12
- package/src/features/validation/marker-navigator.ts +29 -66
- package/src/features/validation/validate.ts +36 -71
- package/src/index.ts +8 -7
- package/src/lib/model.ts +1 -1
- package/src/model-source/glsp-diagram-server.ts +1 -1
- package/src/utils/layout-utils.ts +7 -27
- 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/layout/layout-commands.d.ts.map +0 -1
- package/lib/features/layout/layout-commands.js.map +0 -1
- package/lib/features/layout/layout-commands.spec.d.ts +0 -3
- package/lib/features/layout/layout-commands.spec.d.ts.map +0 -1
- package/lib/features/layout/layout-commands.spec.js.map +0 -1
- 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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmCvD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmCvD,eAAO,MAAM,eAAe,mBAkC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS,CAI9E"}
|
|
@@ -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,13 +60,14 @@ 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,
|
|
68
68
|
di_config_13.default,
|
|
69
|
-
di_config_15.
|
|
69
|
+
di_config_15.toolsModule,
|
|
70
|
+
di_config_15.enableDefaultToolsOnFocusLossModule,
|
|
70
71
|
di_config_16.validationModule,
|
|
71
72
|
sprotty_1.zorderModule
|
|
72
73
|
];
|
|
@@ -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,
|
|
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"}
|
|
@@ -32,12 +32,11 @@ export interface EditModeListener {
|
|
|
32
32
|
* position, etc.).
|
|
33
33
|
*/
|
|
34
34
|
export declare class EditorContextService implements IActionHandler {
|
|
35
|
-
protected editModeListeners: EditModeListener[];
|
|
36
35
|
protected selectionService: SelectionService;
|
|
37
36
|
protected mousePositionTracker: MousePositionTracker;
|
|
38
|
-
protected
|
|
37
|
+
protected editModeListeners: EditModeListener[];
|
|
38
|
+
protected modelSourceProvider: () => Promise<ModelSource>;
|
|
39
39
|
protected _editMode: string;
|
|
40
|
-
constructor(editModeListeners?: EditModeListener[]);
|
|
41
40
|
register(editModeListener: EditModeListener): void;
|
|
42
41
|
deregister(editModeListener: EditModeListener): void;
|
|
43
42
|
get(args?: Args): EditorContext;
|
|
@@ -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,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D;AAED;;;;;;;;;;;GAWG;AACH,qBACa,oBAAqB,YAAW,cAAc;
|
|
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,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v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.EditorContextService = void 0;
|
|
16
13
|
/********************************************************************************
|
|
@@ -47,8 +44,8 @@ const types_1 = require("./types");
|
|
|
47
44
|
* position, etc.).
|
|
48
45
|
*/
|
|
49
46
|
let EditorContextService = class EditorContextService {
|
|
50
|
-
constructor(
|
|
51
|
-
this.editModeListeners =
|
|
47
|
+
constructor() {
|
|
48
|
+
this.editModeListeners = [];
|
|
52
49
|
}
|
|
53
50
|
register(editModeListener) {
|
|
54
51
|
(0, protocol_1.distinctAdd)(this.editModeListeners, editModeListener);
|
|
@@ -81,9 +78,9 @@ let EditorContextService = class EditorContextService {
|
|
|
81
78
|
this.editModeListeners.forEach(listener => listener.editModeChanged(oldValue, this.editMode));
|
|
82
79
|
}
|
|
83
80
|
async getSourceUri() {
|
|
84
|
-
const modelSource = await this.
|
|
81
|
+
const modelSource = await this.modelSourceProvider();
|
|
85
82
|
if ((0, source_uri_aware_1.isSourceUriAware)(modelSource)) {
|
|
86
|
-
return modelSource.
|
|
83
|
+
return modelSource.sourceURI;
|
|
87
84
|
}
|
|
88
85
|
return undefined;
|
|
89
86
|
}
|
|
@@ -108,15 +105,17 @@ __decorate([
|
|
|
108
105
|
(0, inversify_1.inject)(sprotty_1.MousePositionTracker),
|
|
109
106
|
__metadata("design:type", sprotty_1.MousePositionTracker)
|
|
110
107
|
], EditorContextService.prototype, "mousePositionTracker", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, inversify_1.multiInject)(types_1.TYPES.IEditModeListener),
|
|
110
|
+
(0, inversify_1.optional)(),
|
|
111
|
+
__metadata("design:type", Array)
|
|
112
|
+
], EditorContextService.prototype, "editModeListeners", void 0);
|
|
111
113
|
__decorate([
|
|
112
114
|
(0, inversify_1.inject)(types_1.TYPES.ModelSourceProvider),
|
|
113
115
|
__metadata("design:type", Function)
|
|
114
|
-
], EditorContextService.prototype, "
|
|
116
|
+
], EditorContextService.prototype, "modelSourceProvider", void 0);
|
|
115
117
|
EditorContextService = __decorate([
|
|
116
|
-
(0, inversify_1.injectable)()
|
|
117
|
-
__param(0, (0, inversify_1.multiInject)(types_1.TYPES.IEditModeListener)),
|
|
118
|
-
__param(0, (0, inversify_1.optional)()),
|
|
119
|
-
__metadata("design:paramtypes", [Array])
|
|
118
|
+
(0, inversify_1.injectable)()
|
|
120
119
|
], EditorContextService);
|
|
121
120
|
exports.EditorContextService = EditorContextService;
|
|
122
121
|
//# sourceMappingURL=editor-context-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"
|
|
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;IAED,GAAG,CAAC,IAAW;QACX,OAAO;YACH,kBAAkB,EAAE,KAAK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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,YAC0B,MAAyB,EAE/C,6BAAmE;QAEnE,KAAK,iBAAG,OAAO,EAAE,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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
|
-
export declare abstract class SourceUriAware {
|
|
17
|
-
abstract getSourceURI(): string;
|
|
1
|
+
export interface SourceUriAware {
|
|
2
|
+
sourceURI: string;
|
|
18
3
|
}
|
|
19
4
|
export declare function isSourceUriAware(obj: any): obj is SourceUriAware;
|
|
20
5
|
//# sourceMappingURL=source-uri-aware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-uri-aware.d.ts","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-uri-aware.d.ts","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,cAAc,CAEhE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSourceUriAware =
|
|
3
|
+
exports.isSourceUriAware = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2020 EclipseSource and others.
|
|
5
|
+
* Copyright (c) 2020-2022 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -16,11 +16,9 @@ exports.isSourceUriAware = exports.SourceUriAware = void 0;
|
|
|
16
16
|
*
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
exports.SourceUriAware = SourceUriAware;
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
22
20
|
function isSourceUriAware(obj) {
|
|
23
|
-
return obj
|
|
21
|
+
return protocol_1.AnyObject.is(obj) && (0, protocol_1.hasStringProp)(obj, 'sourceURI');
|
|
24
22
|
}
|
|
25
23
|
exports.isSourceUriAware = isSourceUriAware;
|
|
26
24
|
//# sourceMappingURL=source-uri-aware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-uri-aware.js","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"source-uri-aware.js","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkE;AAKlE,SAAgB,gBAAgB,CAAC,GAAQ;IACrC,OAAO,oBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAChE,CAAC;AAFD,4CAEC"}
|
|
@@ -16,15 +16,45 @@
|
|
|
16
16
|
import { Point } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { BoundsAware, SModelElement } from 'sprotty';
|
|
18
18
|
import { ModifyCSSFeedbackAction } from '../tool-feedback/css-feedback';
|
|
19
|
+
/**
|
|
20
|
+
* A `MovementRestrictor` is an optional service that can be used by tools to validate
|
|
21
|
+
* whether a certain move operation (e.g. `ChangeBoundsOperation`) in the diagram is valid.
|
|
22
|
+
*/
|
|
19
23
|
export interface IMovementRestrictor {
|
|
20
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Validate whether moving the given element to a new given location is allowed.
|
|
26
|
+
* @param element The element that should be moved.
|
|
27
|
+
* @param newLocation The new location of the element.
|
|
28
|
+
* @returns `true` if the the element is movable and moving to the given location is allowed, `false` otherwise.
|
|
29
|
+
* Should also return `false` if the newLocation is `undefined`:
|
|
30
|
+
*/
|
|
31
|
+
validate(element: SModelElement, newLocation?: Point): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Feedback css-classes. Can be applied to elements that did fail the validation.
|
|
34
|
+
*/
|
|
21
35
|
cssClasses?: string[];
|
|
22
36
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
/**
|
|
38
|
+
* A `IMovementRestrictor` that checks for overlapping elements. Move operations
|
|
39
|
+
* are only valid if the element does not collide with another element after moving.
|
|
40
|
+
*/
|
|
41
|
+
export declare class NoOverlapMovementRestrictor implements IMovementRestrictor {
|
|
26
42
|
cssClasses: string[];
|
|
27
|
-
validate(
|
|
43
|
+
validate(element: SModelElement, newLocation?: Point): boolean;
|
|
44
|
+
protected areOverlapping(element1: SModelElement & BoundsAware, element2: SModelElement & BoundsAware): boolean;
|
|
28
45
|
}
|
|
29
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Utility function to create an action that applies the given {@link IMovementRestrictor.cssClasses} to the given element.
|
|
48
|
+
* @param element The element on which the css classes should be applied.
|
|
49
|
+
* @param movementRestrictor The movement restrictor whose cssClasses should be applied.
|
|
50
|
+
* @returns The corresponding {@link ModifyCSSFeedbackAction}
|
|
51
|
+
*/
|
|
52
|
+
export declare function createMovementRestrictionFeedback(element: SModelElement, movementRestrictor: IMovementRestrictor): ModifyCSSFeedbackAction;
|
|
53
|
+
/**
|
|
54
|
+
* Utility function to create an action that removes the given {@link IMovementRestrictor.cssClasses} from the given element.
|
|
55
|
+
* @param element The element from which the css classes should be removed.
|
|
56
|
+
* @param movementRestrictor The movement restrictor whose cssClasses should be removed.
|
|
57
|
+
* @returns The corresponding {@link ModifyCSSFeedbackAction}
|
|
58
|
+
*/
|
|
59
|
+
export declare function removeMovementRestrictionFeedback(element: SModelElement, movementRestrictor: IMovementRestrictor): ModifyCSSFeedbackAction;
|
|
30
60
|
//# sourceMappingURL=movement-restrictor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement-restrictor.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/movement-restrictor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAyB,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"movement-restrictor.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/movement-restrictor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAyB,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGxE;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAC/D;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,qBACa,2BAA4B,YAAW,mBAAmB;IACnE,UAAU,WAA4B;IAEtC,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO;IAsB9D,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,WAAW,EAAE,QAAQ,EAAE,aAAa,GAAG,WAAW,GAAG,OAAO;CAoBlH;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC7C,OAAO,EAAE,aAAa,EACtB,kBAAkB,EAAE,mBAAmB,GACxC,uBAAuB,CAMzB;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC7C,OAAO,EAAE,aAAa,EACtB,kBAAkB,EAAE,mBAAmB,GACxC,uBAAuB,CAOzB"}
|