@eclipse-glsp/client 2.2.0-next.342 → 2.2.0-next.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base/default.module.d.ts.map +1 -1
- package/lib/base/default.module.js +2 -0
- package/lib/base/default.module.js.map +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +7 -5
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js +7 -7
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.js +1 -1
- package/lib/features/accessibility/search/search-palette-module.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js +3 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -1
- package/lib/features/bounds/bounds-module.d.ts.map +1 -1
- package/lib/features/bounds/bounds-module.js +1 -1
- package/lib/features/bounds/bounds-module.js.map +1 -1
- package/lib/features/command-palette/command-palette-module.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-module.js +1 -1
- package/lib/features/command-palette/command-palette-module.js.map +1 -1
- package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
- package/lib/features/context-menu/context-menu-module.js +1 -1
- package/lib/features/context-menu/context-menu-module.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.js +5 -2
- package/lib/features/copy-paste/copy-paste-modules.js.map +1 -1
- package/lib/features/debug/debug-module.d.ts.map +1 -1
- package/lib/features/debug/debug-module.js +1 -1
- package/lib/features/debug/debug-module.js.map +1 -1
- package/lib/features/decoration/decoration-module.d.ts.map +1 -1
- package/lib/features/decoration/decoration-module.js +1 -1
- package/lib/features/decoration/decoration-module.js.map +1 -1
- package/lib/features/element-template/element-template-module.d.ts.map +1 -1
- package/lib/features/element-template/element-template-module.js +1 -1
- package/lib/features/element-template/element-template-module.js.map +1 -1
- package/lib/features/export/export-modules.d.ts.map +1 -1
- package/lib/features/export/export-modules.js +2 -2
- package/lib/features/export/export-modules.js.map +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
- package/lib/features/export/glsp-svg-exporter.js +6 -6
- package/lib/features/export/glsp-svg-exporter.js.map +1 -1
- package/lib/features/grid/grid-module.d.ts.map +1 -1
- package/lib/features/grid/grid-module.js +1 -1
- package/lib/features/grid/grid-module.js.map +1 -1
- package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-module.js +1 -1
- package/lib/features/helper-lines/helper-line-module.js.map +1 -1
- package/lib/features/hints/type-hints-module.d.ts.map +1 -1
- package/lib/features/hints/type-hints-module.js +1 -1
- package/lib/features/hints/type-hints-module.js.map +1 -1
- package/lib/features/hover/hover-module.d.ts.map +1 -1
- package/lib/features/hover/hover-module.js +1 -1
- package/lib/features/hover/hover-module.js.map +1 -1
- package/lib/features/label-edit/label-edit-module.d.ts.map +1 -1
- package/lib/features/label-edit/label-edit-module.js +1 -1
- package/lib/features/label-edit/label-edit-module.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js.map +1 -1
- package/lib/features/layout/layout-module.d.ts.map +1 -1
- package/lib/features/layout/layout-module.js +1 -1
- package/lib/features/layout/layout-module.js.map +1 -1
- package/lib/features/navigation/navigation-module.d.ts.map +1 -1
- package/lib/features/navigation/navigation-module.js +1 -1
- package/lib/features/navigation/navigation-module.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +1 -1
- package/lib/features/routing/routing-module.js.map +1 -1
- package/lib/features/save/save-module.d.ts.map +1 -1
- package/lib/features/save/save-module.js +1 -1
- package/lib/features/save/save-module.js.map +1 -1
- package/lib/features/select/select-module.d.ts.map +1 -1
- package/lib/features/select/select-module.js +2 -2
- package/lib/features/select/select-module.js.map +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -1
- package/lib/features/status/status-module.d.ts.map +1 -1
- package/lib/features/status/status-module.js +1 -1
- package/lib/features/status/status-module.js.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.d.ts.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.js +1 -1
- package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.d.ts.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.js +4 -1
- package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.d.ts +15 -0
- package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.js +2 -2
- package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
- package/lib/features/validation/validation-modules.d.ts.map +1 -1
- package/lib/features/validation/validation-modules.js +3 -3
- package/lib/features/validation/validation-modules.js.map +1 -1
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
- package/lib/features/viewport/viewport-modules.js +2 -2
- package/lib/features/viewport/viewport-modules.js.map +1 -1
- package/lib/standalone-modules.d.ts.map +1 -1
- package/lib/standalone-modules.js +1 -1
- package/lib/standalone-modules.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +1 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +80 -73
- package/src/features/accessibility/accessibility-module.ts +23 -18
- package/src/features/accessibility/keyboard-pointer/keyboard-pointer-module.ts +18 -15
- package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.ts +7 -4
- package/src/features/accessibility/move-zoom/move-zoom-module.ts +7 -4
- package/src/features/accessibility/resize-key-tool/resize-key-module.ts +7 -4
- package/src/features/accessibility/search/search-palette-module.ts +7 -4
- package/src/features/accessibility/view-key-tools/view-key-tools-module.ts +10 -5
- package/src/features/bounds/bounds-module.ts +20 -17
- package/src/features/command-palette/command-palette-module.ts +9 -6
- package/src/features/context-menu/context-menu-module.ts +16 -13
- package/src/features/copy-paste/copy-paste-modules.ts +11 -5
- package/src/features/debug/debug-module.ts +10 -7
- package/src/features/decoration/decoration-module.ts +6 -3
- package/src/features/element-template/element-template-module.ts +8 -5
- package/src/features/export/export-modules.ts +10 -7
- package/src/features/export/glsp-svg-exporter.ts +6 -5
- package/src/features/grid/grid-module.ts +11 -8
- package/src/features/helper-lines/helper-line-module.ts +16 -13
- package/src/features/hints/type-hints-module.ts +10 -7
- package/src/features/hover/hover-module.ts +28 -25
- package/src/features/label-edit/label-edit-module.ts +9 -6
- package/src/features/label-edit-ui/label-edit-ui-module.ts +9 -6
- package/src/features/layout/layout-module.ts +8 -5
- package/src/features/navigation/navigation-module.ts +11 -8
- package/src/features/routing/routing-module.ts +21 -18
- package/src/features/save/save-module.ts +6 -3
- package/src/features/select/select-module.ts +11 -8
- package/src/features/source-model-watcher/source-model-watcher-module.ts +6 -3
- package/src/features/status/status-module.ts +9 -6
- package/src/features/svg-metadata/svg-metadata-module.ts +7 -4
- package/src/features/tool-palette/tool-palette-module.ts +10 -7
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +11 -8
- package/src/features/tools/deletion/deletion-tool-module.ts +8 -5
- package/src/features/tools/edge-creation/edege-creation-module.ts +9 -6
- package/src/features/tools/edge-edit/edge-edit-module.ts +14 -11
- package/src/features/tools/marquee-selection/marquee-selection-module.ts +11 -8
- package/src/features/tools/node-creation/node-creation-module.ts +4 -1
- package/src/features/tools/tool-focus-loss-module.ts +7 -4
- package/src/features/validation/validation-modules.ts +19 -13
- package/src/features/viewport/viewport-modules.ts +20 -17
- package/src/standalone-modules.ts +12 -9
- package/src/views/base-view-module.ts +7 -4
|
@@ -17,6 +17,9 @@ import { FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
|
17
17
|
import '../../../css/decoration.css';
|
|
18
18
|
import { GlspDecorationPlacer } from './decoration-placer';
|
|
19
19
|
|
|
20
|
-
export const decorationModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export const decorationModule = new FeatureModule(
|
|
21
|
+
bind => {
|
|
22
|
+
bindAsService(bind, TYPES.IVNodePostprocessor, GlspDecorationPlacer);
|
|
23
|
+
},
|
|
24
|
+
{ featureId: Symbol('decoration') }
|
|
25
|
+
);
|
|
@@ -17,8 +17,11 @@ import { FeatureModule, configureCommand } from '@eclipse-glsp/sprotty';
|
|
|
17
17
|
import { AddTemplateElementsFeedbackCommand } from './add-template-element';
|
|
18
18
|
import { RemoveTemplateElementsFeedbackCommand } from './remove-template-element';
|
|
19
19
|
|
|
20
|
-
export const elementTemplateModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
export const elementTemplateModule = new FeatureModule(
|
|
21
|
+
(bind, unbind, isBound, rebind) => {
|
|
22
|
+
const context = { bind, unbind, isBound, rebind };
|
|
23
|
+
configureCommand(context, AddTemplateElementsFeedbackCommand);
|
|
24
|
+
configureCommand(context, RemoveTemplateElementsFeedbackCommand);
|
|
25
|
+
},
|
|
26
|
+
{ featureId: Symbol('elementTemplate') }
|
|
27
|
+
);
|
|
@@ -27,12 +27,15 @@ import {
|
|
|
27
27
|
import { ExportSvgActionHandler } from './export-svg-action-handler';
|
|
28
28
|
import { GLSPSvgExporter } from './glsp-svg-exporter';
|
|
29
29
|
|
|
30
|
-
export const exportModule = new FeatureModule(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
export const exportModule = new FeatureModule(
|
|
31
|
+
(bind, _unbind, isBound) => {
|
|
32
|
+
const context = { bind, isBound };
|
|
33
|
+
bindAsService(context, TYPES.HiddenVNodePostprocessor, ExportSvgPostprocessor);
|
|
34
|
+
configureCommand(context, ExportSvgCommand);
|
|
35
|
+
bind(TYPES.SvgExporter).to(GLSPSvgExporter).inSingletonScope();
|
|
36
|
+
},
|
|
37
|
+
{ featureId: Symbol('export') }
|
|
38
|
+
);
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -46,5 +49,5 @@ export const standaloneExportModule = new FeatureModule(
|
|
|
46
49
|
bind(ExportSvgActionHandler).toSelf().inSingletonScope();
|
|
47
50
|
configureActionHandler(context, ExportSvgAction.KIND, ExportSvgActionHandler);
|
|
48
51
|
},
|
|
49
|
-
{ requires: exportModule }
|
|
52
|
+
{ featureId: Symbol('standaloneExport'), requires: exportModule }
|
|
50
53
|
);
|
|
@@ -77,7 +77,7 @@ export class GLSPSvgExporter extends SvgExporter {
|
|
|
77
77
|
const propertyValue = sourceStyle.getPropertyValue(propertyName);
|
|
78
78
|
const propertyPriority = sourceStyle.getPropertyPriority(propertyName);
|
|
79
79
|
if (targetStyle.getPropertyValue(propertyName) !== propertyValue) {
|
|
80
|
-
if (
|
|
80
|
+
if (this.shouldUpdateStyle(target)) {
|
|
81
81
|
// rather set the property directly on the element to keep other values intact
|
|
82
82
|
target.style.setProperty(propertyName, propertyValue);
|
|
83
83
|
} else {
|
|
@@ -92,6 +92,11 @@ export class GLSPSvgExporter extends SvgExporter {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
protected shouldUpdateStyle(element: any): element is ElementCSSInlineStyle {
|
|
96
|
+
// we want to simply update the style of elements and keep other values intact if they have a style property
|
|
97
|
+
return 'tagName' in element && 'style' in element;
|
|
98
|
+
}
|
|
99
|
+
|
|
95
100
|
protected getSvgExport(
|
|
96
101
|
serializedSvgElement: string,
|
|
97
102
|
svgElement: SVGElement,
|
|
@@ -113,7 +118,3 @@ export class GLSPSvgExporter extends SvgExporter {
|
|
|
113
118
|
);
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
|
-
|
|
117
|
-
export function isElementCSSInlineStyle(element: any): element is ElementCSSInlineStyle {
|
|
118
|
-
return 'style' in element && element.style instanceof CSSStyleDeclaration;
|
|
119
|
-
}
|
|
@@ -20,15 +20,18 @@ import { GridManager } from './grid-manager';
|
|
|
20
20
|
import { ShowGridAction, ShowGridCommand } from './grid-model';
|
|
21
21
|
import { GridSnapper } from './grid-snapper';
|
|
22
22
|
|
|
23
|
-
export const gridModule = new FeatureModule(
|
|
24
|
-
|
|
23
|
+
export const gridModule = new FeatureModule(
|
|
24
|
+
(bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
bind(TYPES.Grid).toConstantValue({ x: 10, y: 10 });
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
configureCommand(context, ShowGridCommand);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
bind(GridManager).toSelf().inSingletonScope();
|
|
32
|
+
configureActionHandler(context, ShowGridAction.KIND, GridManager);
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
}
|
|
34
|
+
bind(TYPES.ISnapper).to(GridSnapper);
|
|
35
|
+
},
|
|
36
|
+
{ featureId: Symbol('grid') }
|
|
37
|
+
);
|
|
@@ -31,17 +31,20 @@ import { HelperLineManager } from './helper-line-manager-default';
|
|
|
31
31
|
import { HELPER_LINE, HelperLine, SELECTION_BOUNDS, SelectionBounds } from './model';
|
|
32
32
|
import { HelperLineView, SelectionBoundsView } from './view';
|
|
33
33
|
|
|
34
|
-
export const helperLineModule = new FeatureModule(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
export const helperLineModule = new FeatureModule(
|
|
35
|
+
(bind, unbind, isBound, rebind) => {
|
|
36
|
+
const context = { bind, unbind, isBound, rebind };
|
|
37
|
+
configureModelElement(context, HELPER_LINE, HelperLine, HelperLineView);
|
|
38
|
+
configureModelElement(context, SELECTION_BOUNDS, SelectionBounds, SelectionBoundsView);
|
|
39
|
+
configureCommand(context, DrawHelperLinesFeedbackCommand);
|
|
40
|
+
configureCommand(context, RemoveHelperLinesFeedbackCommand);
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
42
|
+
bindAsService(bind, TYPES.IHelperLineManager, HelperLineManager);
|
|
43
|
+
configureActionHandler(context, SetBoundsAction.KIND, TYPES.IHelperLineManager);
|
|
44
|
+
configureActionHandler(context, SetBoundsFeedbackAction.KIND, TYPES.IHelperLineManager);
|
|
45
|
+
configureActionHandler(context, MoveAction.KIND, TYPES.IHelperLineManager);
|
|
46
|
+
configureActionHandler(context, MoveInitializedEventAction.KIND, TYPES.IHelperLineManager);
|
|
47
|
+
configureActionHandler(context, MoveFinishedEventAction.KIND, TYPES.IHelperLineManager);
|
|
48
|
+
},
|
|
49
|
+
{ featureId: Symbol('helperLine') }
|
|
50
|
+
);
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
import { FeatureModule, SetTypeHintsAction, TYPES, bindAsService, configureActionHandler, configureCommand } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { ApplyTypeHintsCommand, TypeHintProvider } from './type-hint-provider';
|
|
18
18
|
|
|
19
|
-
export const typeHintsModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
export const typeHintsModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound) => {
|
|
21
|
+
const context = { bind, unbind, isBound };
|
|
22
|
+
bindAsService(context, TYPES.ITypeHintProvider, TypeHintProvider);
|
|
23
|
+
bind(TYPES.IDiagramStartup).toService(TypeHintProvider);
|
|
24
|
+
configureActionHandler(context, SetTypeHintsAction.KIND, TypeHintProvider);
|
|
25
|
+
configureCommand(context, ApplyTypeHintsCommand);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('typeHints') }
|
|
28
|
+
);
|
|
@@ -35,30 +35,33 @@ import { FocusStateChangedAction } from '../../base/focus/focus-state-change-act
|
|
|
35
35
|
import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool';
|
|
36
36
|
import { GlspHoverMouseListener } from './hover';
|
|
37
37
|
|
|
38
|
-
export const hoverModule = new FeatureModule(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
export const hoverModule = new FeatureModule(
|
|
39
|
+
(bind, _unbind, isBound) => {
|
|
40
|
+
const context = { bind, isBound };
|
|
41
|
+
bindAsService(context, TYPES.PopupVNodePostprocessor, PopupPositionUpdater);
|
|
42
|
+
bindAsService(context, TYPES.MouseListener, GlspHoverMouseListener);
|
|
43
|
+
bindAsService(context, TYPES.PopupMouseListener, PopupHoverMouseListener);
|
|
44
|
+
bindAsService(context, TYPES.KeyListener, HoverKeyListener);
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
bind<HoverState>(TYPES.HoverState).toConstantValue({
|
|
47
|
+
mouseOverTimer: undefined,
|
|
48
|
+
mouseOutTimer: undefined,
|
|
49
|
+
popupOpen: false,
|
|
50
|
+
previousPopupElement: undefined
|
|
51
|
+
});
|
|
52
|
+
bind(ClosePopupActionHandler).toSelf().inSingletonScope();
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
54
|
+
configureCommand(context, HoverFeedbackCommand);
|
|
55
|
+
configureCommand(context, SetPopupModelCommand);
|
|
56
|
+
configureActionHandler(context, SetPopupModelCommand.KIND, ClosePopupActionHandler);
|
|
57
|
+
configureActionHandler(context, FitToScreenCommand.KIND, ClosePopupActionHandler);
|
|
58
|
+
configureActionHandler(context, CenterCommand.KIND, ClosePopupActionHandler);
|
|
59
|
+
configureActionHandler(context, SetViewportCommand.KIND, ClosePopupActionHandler);
|
|
60
|
+
configureActionHandler(context, MoveCommand.KIND, ClosePopupActionHandler);
|
|
61
|
+
configureActionHandler(context, FocusStateChangedAction.KIND, ClosePopupActionHandler);
|
|
62
|
+
configureActionHandler(context, EnableToolsAction.KIND, GlspHoverMouseListener);
|
|
63
|
+
configureActionHandler(context, EnableDefaultToolsAction.KIND, GlspHoverMouseListener);
|
|
64
|
+
configureActionHandler(context, FocusStateChangedAction.KIND, GlspHoverMouseListener);
|
|
65
|
+
},
|
|
66
|
+
{ featureId: Symbol('hover') }
|
|
67
|
+
);
|
|
@@ -17,9 +17,12 @@ import { ApplyLabelEditCommand, FeatureModule, TYPES, bindAsService, configureCo
|
|
|
17
17
|
import { DirectLabelEditTool } from './edit-label-tool';
|
|
18
18
|
import { BalloonLabelValidationDecorator, ServerEditLabelValidator } from './edit-label-validator';
|
|
19
19
|
|
|
20
|
-
export const labelEditModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
20
|
+
export const labelEditModule = new FeatureModule(
|
|
21
|
+
(bind, _unbind, isBound, _rebind) => {
|
|
22
|
+
bind(TYPES.IEditLabelValidator).to(ServerEditLabelValidator);
|
|
23
|
+
bind(TYPES.IEditLabelValidationDecorator).to(BalloonLabelValidationDecorator);
|
|
24
|
+
bindAsService(bind, TYPES.IDefaultTool, DirectLabelEditTool);
|
|
25
|
+
configureCommand({ bind, isBound }, ApplyLabelEditCommand);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('labelEdit') }
|
|
28
|
+
);
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
import { EditLabelAction, EditLabelActionHandler, FeatureModule, TYPES, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { GlspEditLabelUI } from './label-edit-ui';
|
|
18
18
|
|
|
19
|
-
export const labelEditUiModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
export const labelEditUiModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound, rebind, ...rest) => {
|
|
21
|
+
const context = { bind, unbind, isBound, rebind };
|
|
22
|
+
configureActionHandler(context, EditLabelAction.KIND, EditLabelActionHandler);
|
|
23
|
+
bind(GlspEditLabelUI).toSelf().inSingletonScope();
|
|
24
|
+
bind(TYPES.IUIExtension).toService(GlspEditLabelUI);
|
|
25
|
+
},
|
|
26
|
+
{ featureId: Symbol('labelEditUi') }
|
|
27
|
+
);
|
|
@@ -21,8 +21,11 @@ import {
|
|
|
21
21
|
ResizeElementsActionHandler
|
|
22
22
|
} from './layout-elements-action';
|
|
23
23
|
|
|
24
|
-
export const layoutModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const layoutModule = new FeatureModule(
|
|
25
|
+
(bind, _unbind, isBound) => {
|
|
26
|
+
const context = { bind, isBound };
|
|
27
|
+
configureActionHandler(context, ResizeElementsAction.KIND, ResizeElementsActionHandler);
|
|
28
|
+
configureActionHandler(context, AlignElementsAction.KIND, AlignElementsActionHandler);
|
|
29
|
+
},
|
|
30
|
+
{ featureId: Symbol('layout') }
|
|
31
|
+
);
|
|
@@ -17,11 +17,14 @@ import { FeatureModule, NavigateToExternalTargetAction, NavigateToTargetAction,
|
|
|
17
17
|
import { NavigateAction, NavigationActionHandler, ProcessNavigationArgumentsAction } from './navigation-action-handler';
|
|
18
18
|
import { NavigationTargetResolver } from './navigation-target-resolver';
|
|
19
19
|
|
|
20
|
-
export const navigationModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
20
|
+
export const navigationModule = new FeatureModule(
|
|
21
|
+
(bind, _unbind, isBound) => {
|
|
22
|
+
bind(NavigationTargetResolver).toSelf().inSingletonScope();
|
|
23
|
+
bind(NavigationActionHandler).toSelf().inSingletonScope();
|
|
24
|
+
configureActionHandler({ bind, isBound }, NavigateAction.KIND, NavigationActionHandler);
|
|
25
|
+
configureActionHandler({ bind, isBound }, NavigateToTargetAction.KIND, NavigationActionHandler);
|
|
26
|
+
configureActionHandler({ bind, isBound }, ProcessNavigationArgumentsAction.KIND, NavigationActionHandler);
|
|
27
|
+
configureActionHandler({ bind, isBound }, NavigateToExternalTargetAction.KIND, NavigationActionHandler);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('navigation') }
|
|
30
|
+
);
|
|
@@ -33,25 +33,28 @@ import {
|
|
|
33
33
|
} from '@eclipse-glsp/sprotty';
|
|
34
34
|
import { GLSPBezierEdgeRouter, GLSPManhattanEdgeRouter, GLSPPolylineEdgeRouter } from './edge-router';
|
|
35
35
|
|
|
36
|
-
export const routingModule = new FeatureModule(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
export const routingModule = new FeatureModule(
|
|
37
|
+
(bind, unbind, isBound, rebind) => {
|
|
38
|
+
const context = { bind, unbind, isBound, rebind };
|
|
39
|
+
bind(EdgeRouterRegistry).toSelf().inSingletonScope();
|
|
40
|
+
bind(AnchorComputerRegistry).toSelf().inSingletonScope();
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPManhattanEdgeRouter);
|
|
43
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanEllipticAnchor);
|
|
44
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanRectangularAnchor);
|
|
45
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanDiamondAnchor);
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPPolylineEdgeRouter);
|
|
48
|
+
bindAsService(context, TYPES.IAnchorComputer, EllipseAnchor);
|
|
49
|
+
bindAsService(context, TYPES.IAnchorComputer, RectangleAnchor);
|
|
50
|
+
bindAsService(context, TYPES.IAnchorComputer, DiamondAnchor);
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPBezierEdgeRouter);
|
|
53
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierEllipseAnchor);
|
|
54
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierRectangleAnchor);
|
|
55
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierDiamondAnchor);
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
}
|
|
57
|
+
configureCommand({ bind, isBound }, AddRemoveBezierSegmentCommand);
|
|
58
|
+
},
|
|
59
|
+
{ featureId: Symbol('routing') }
|
|
60
|
+
);
|
|
@@ -21,6 +21,9 @@ import { SaveModelKeyboardListener } from './save-keylistener';
|
|
|
21
21
|
* When integrated into an application frame (e.g Theia/VS Code) this module is typically omitted and/or replaced
|
|
22
22
|
* with an application native module.
|
|
23
23
|
*/
|
|
24
|
-
export const saveModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export const saveModule = new FeatureModule(
|
|
25
|
+
bind => {
|
|
26
|
+
bindAsService(bind, TYPES.KeyListener, SaveModelKeyboardListener);
|
|
27
|
+
},
|
|
28
|
+
{ featureId: Symbol('save') }
|
|
29
|
+
);
|
|
@@ -18,13 +18,16 @@ import { SelectAllCommand, SelectCommand } from '../../base/selection-service';
|
|
|
18
18
|
import { SelectFeedbackCommand } from './select-feedback-command';
|
|
19
19
|
import { RankedSelectMouseListener } from './select-mouse-listener';
|
|
20
20
|
|
|
21
|
-
export const selectModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export const selectModule = new FeatureModule(
|
|
22
|
+
(bind, _unbind, isBound) => {
|
|
23
|
+
const context = { bind, isBound };
|
|
24
|
+
configureCommand(context, SelectCommand);
|
|
25
|
+
configureCommand(context, SelectAllCommand);
|
|
26
|
+
configureCommand(context, SelectFeedbackCommand);
|
|
27
|
+
bindAsService(context, TYPES.MouseListener, RankedSelectMouseListener);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('select') }
|
|
30
|
+
);
|
|
28
31
|
|
|
29
32
|
/**
|
|
30
33
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -35,5 +38,5 @@ export const standaloneSelectModule = new FeatureModule(
|
|
|
35
38
|
bind => {
|
|
36
39
|
bindAsService(bind, TYPES.KeyListener, SelectKeyboardListener);
|
|
37
40
|
},
|
|
38
|
-
{ requires: selectModule }
|
|
41
|
+
{ featureId: Symbol('standaloneSelect'), requires: selectModule }
|
|
39
42
|
);
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
import { FeatureModule, SourceModelChangedAction, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { SourceModelChangedActionHandler } from './source-model-changed-action-handler';
|
|
18
18
|
|
|
19
|
-
export const sourceModelWatcherModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
});
|
|
19
|
+
export const sourceModelWatcherModule = new FeatureModule(
|
|
20
|
+
(bind, _unbind, isBound) => {
|
|
21
|
+
configureActionHandler({ bind, isBound }, SourceModelChangedAction.KIND, SourceModelChangedActionHandler);
|
|
22
|
+
},
|
|
23
|
+
{ featureId: Symbol('sourceModelWatcher') }
|
|
24
|
+
);
|
|
@@ -18,9 +18,12 @@ import { FeatureModule, StatusAction, TYPES, bindAsService, configureActionHandl
|
|
|
18
18
|
import '../../../css/status-overlay.css';
|
|
19
19
|
import { StatusOverlay } from './status-overlay';
|
|
20
20
|
|
|
21
|
-
export const statusModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
export const statusModule = new FeatureModule(
|
|
22
|
+
(bind, unbind, isBound, rebind) => {
|
|
23
|
+
const context = { bind, unbind, isBound, rebind };
|
|
24
|
+
bindAsService(context, TYPES.IUIExtension, StatusOverlay);
|
|
25
|
+
bind(TYPES.IDiagramStartup).toService(StatusOverlay);
|
|
26
|
+
configureActionHandler(context, StatusAction.KIND, StatusOverlay);
|
|
27
|
+
},
|
|
28
|
+
{ featureId: Symbol('status') }
|
|
29
|
+
);
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
import { FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { MetadataPlacer } from './metadata-placer';
|
|
19
19
|
|
|
20
|
-
export const svgMetadataModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export const svgMetadataModule = new FeatureModule(
|
|
21
|
+
bind => {
|
|
22
|
+
bind(MetadataPlacer).toSelf().inSingletonScope();
|
|
23
|
+
bind(TYPES.IVNodePostprocessor).toService(MetadataPlacer);
|
|
24
|
+
},
|
|
25
|
+
{ featureId: Symbol('svgMetadata') }
|
|
26
|
+
);
|
|
@@ -18,10 +18,13 @@ import '../../../css/tool-palette.css';
|
|
|
18
18
|
import { EnableDefaultToolsAction } from '../../base/tool-manager/tool';
|
|
19
19
|
import { ToolPalette } from './tool-palette';
|
|
20
20
|
|
|
21
|
-
export const toolPaletteModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
21
|
+
export const toolPaletteModule = new FeatureModule(
|
|
22
|
+
(bind, _unbind, isBound, _rebind) => {
|
|
23
|
+
bindAsService(bind, TYPES.IUIExtension, ToolPalette);
|
|
24
|
+
bind(TYPES.IDiagramStartup).toService(ToolPalette);
|
|
25
|
+
configureActionHandler({ bind, isBound }, EnableDefaultToolsAction.KIND, ToolPalette);
|
|
26
|
+
configureActionHandler({ bind, isBound }, UpdateModelAction.KIND, ToolPalette);
|
|
27
|
+
configureActionHandler({ bind, isBound }, SetModelAction.KIND, ToolPalette);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('toolPalette') }
|
|
30
|
+
);
|
|
@@ -21,11 +21,14 @@ import { ChangeBoundsTool } from './change-bounds-tool';
|
|
|
21
21
|
import { HideChangeBoundsToolResizeFeedbackCommand, ShowChangeBoundsToolResizeFeedbackCommand } from './change-bounds-tool-feedback';
|
|
22
22
|
import { SResizeHandleView } from './view';
|
|
23
23
|
|
|
24
|
-
export const changeBoundsToolModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
export const changeBoundsToolModule = new FeatureModule(
|
|
25
|
+
(bind, unbind, isBound, rebind) => {
|
|
26
|
+
const context = { bind, unbind, isBound, rebind };
|
|
27
|
+
bind(ChangeBoundsManager).toSelf().inSingletonScope();
|
|
28
|
+
bindAsService(context, TYPES.IDefaultTool, ChangeBoundsTool);
|
|
29
|
+
configureCommand(context, ShowChangeBoundsToolResizeFeedbackCommand);
|
|
30
|
+
configureCommand(context, HideChangeBoundsToolResizeFeedbackCommand);
|
|
31
|
+
configureView(context, SResizeHandle.TYPE, SResizeHandleView);
|
|
32
|
+
},
|
|
33
|
+
{ featureId: Symbol('changeBoundsTool') }
|
|
34
|
+
);
|
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
import { FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
|
|
18
18
|
|
|
19
|
-
export const deletionToolModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
export const deletionToolModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound, rebind) => {
|
|
21
|
+
const context = { bind, unbind, isBound, rebind };
|
|
22
|
+
bindAsService(context, TYPES.IDefaultTool, DelKeyDeleteTool);
|
|
23
|
+
bindAsService(context, TYPES.ITool, MouseDeleteTool);
|
|
24
|
+
},
|
|
25
|
+
{ featureId: Symbol('deletionTool') }
|
|
26
|
+
);
|
|
@@ -17,9 +17,12 @@ import { FeatureModule, TYPES, TriggerEdgeCreationAction, bindAsService, configu
|
|
|
17
17
|
import { configureDanglingFeedbackEdge } from './dangling-edge-feedback';
|
|
18
18
|
import { EdgeCreationTool } from './edge-creation-tool';
|
|
19
19
|
|
|
20
|
-
export const edgeCreationToolModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
export const edgeCreationToolModule = new FeatureModule(
|
|
21
|
+
(bind, unbind, isBound, rebind) => {
|
|
22
|
+
const context = { bind, unbind, isBound, rebind };
|
|
23
|
+
bindAsService(context, TYPES.ITool, EdgeCreationTool);
|
|
24
|
+
configureActionHandler(context, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
|
|
25
|
+
configureDanglingFeedbackEdge(context);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('edgeCreationTool') }
|
|
28
|
+
);
|
|
@@ -23,16 +23,19 @@ import {
|
|
|
23
23
|
SwitchRoutingModeCommand
|
|
24
24
|
} from './edge-edit-tool-feedback';
|
|
25
25
|
|
|
26
|
-
export const edgeEditToolModule = new FeatureModule(
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
export const edgeEditToolModule = new FeatureModule(
|
|
27
|
+
(bind, unbind, isBound, rebind) => {
|
|
28
|
+
const context = { bind, unbind, isBound, rebind };
|
|
29
|
+
bindAsService(context, TYPES.IDefaultTool, EdgeEditTool);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
// reconnect edge tool feedback
|
|
32
|
+
configureCommand(context, ShowEdgeReconnectHandlesFeedbackCommand);
|
|
33
|
+
configureCommand(context, HideEdgeReconnectHandlesFeedbackCommand);
|
|
34
|
+
configureCommand(context, DrawFeedbackEdgeSourceCommand);
|
|
35
|
+
configureCommand(context, SwitchRoutingModeCommand);
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
37
|
+
// dangling edge feedback
|
|
38
|
+
configureDanglingFeedbackEdge(context);
|
|
39
|
+
},
|
|
40
|
+
{ featureId: Symbol('edgeEditTool') }
|
|
41
|
+
);
|
|
@@ -20,13 +20,16 @@ import { DrawMarqueeCommand, MARQUEE, RemoveMarqueeCommand } from './marquee-too
|
|
|
20
20
|
import { MarqueeNode } from './model';
|
|
21
21
|
import { MarqueeView } from './view';
|
|
22
22
|
|
|
23
|
-
export const marqueeSelectionToolModule = new FeatureModule(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
export const marqueeSelectionToolModule = new FeatureModule(
|
|
24
|
+
(bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
26
|
+
bindAsService(context, TYPES.IDefaultTool, MarqueeTool);
|
|
27
|
+
bindAsService(context, TYPES.ITool, MarqueeMouseTool);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
configureCommand(context, DrawMarqueeCommand);
|
|
30
|
+
configureCommand(context, RemoveMarqueeCommand);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
}
|
|
32
|
+
configureModelElement(context, MARQUEE, MarqueeNode, MarqueeView);
|
|
33
|
+
},
|
|
34
|
+
{ featureId: Symbol('marqueeSelectionTool') }
|
|
35
|
+
);
|
|
@@ -35,5 +35,8 @@ export const nodeCreationToolModule = new FeatureModule(
|
|
|
35
35
|
configureActionHandler(context, TriggerNodeCreationAction.KIND, NodeCreationTool);
|
|
36
36
|
configureModelElement(context, InsertIndicator.TYPE, InsertIndicator, InsertIndicatorView);
|
|
37
37
|
},
|
|
38
|
-
{
|
|
38
|
+
{
|
|
39
|
+
featureId: Symbol('nodeCreationTool'),
|
|
40
|
+
requires: elementTemplateModule
|
|
41
|
+
}
|
|
39
42
|
);
|