@eclipse-glsp/client 2.2.0-next.343 → 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/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/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
|
@@ -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
|
);
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { injectable } from 'inversify';
|
|
17
16
|
import { Action, FeatureModule, IActionHandler, ICommand, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { injectable } from 'inversify';
|
|
18
18
|
import { FocusStateChangedAction } from '../../base/focus/focus-state-change-action';
|
|
19
19
|
import { EnableDefaultToolsAction } from '../../base/tool-manager/tool';
|
|
20
20
|
|
|
@@ -34,6 +34,9 @@ export class EnableDefaultToolsOnFocusLossHandler implements IActionHandler {
|
|
|
34
34
|
/**
|
|
35
35
|
* Enables the default tools in the tool manager if the diagram looses focus.
|
|
36
36
|
*/
|
|
37
|
-
export const toolFocusLossModule = new FeatureModule(
|
|
38
|
-
|
|
39
|
-
});
|
|
37
|
+
export const toolFocusLossModule = new FeatureModule(
|
|
38
|
+
(bind, _unbind, isBound) => {
|
|
39
|
+
configureActionHandler({ bind, isBound }, FocusStateChangedAction.KIND, EnableDefaultToolsOnFocusLossHandler);
|
|
40
|
+
},
|
|
41
|
+
{ featureId: Symbol('toolFocusLoss ') }
|
|
42
|
+
);
|
|
@@ -25,19 +25,25 @@ import {
|
|
|
25
25
|
} from './marker-navigator';
|
|
26
26
|
import { ApplyMarkersCommand, DeleteMarkersCommand, SetMarkersActionHandler, ValidationFeedbackEmitter } from './validate';
|
|
27
27
|
|
|
28
|
-
export const validationModule = new FeatureModule(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
export const validationModule = new FeatureModule(
|
|
29
|
+
(bind, _unbind, isBound) => {
|
|
30
|
+
const context = { bind, isBound };
|
|
31
|
+
configureActionHandler(context, SetMarkersAction.KIND, SetMarkersActionHandler);
|
|
32
|
+
configureCommand(context, ApplyMarkersCommand);
|
|
33
|
+
configureCommand(context, DeleteMarkersCommand);
|
|
34
|
+
bind(ValidationFeedbackEmitter).toSelf().inSingletonScope();
|
|
35
|
+
},
|
|
36
|
+
{ featureId: Symbol('validation') }
|
|
37
|
+
);
|
|
35
38
|
|
|
36
|
-
export const markerNavigatorModule = new FeatureModule(
|
|
37
|
-
bind
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
39
|
+
export const markerNavigatorModule = new FeatureModule(
|
|
40
|
+
(bind, _unbind, isBound) => {
|
|
41
|
+
bind(GModelElementComparator).to(LeftToRightTopToBottomComparator).inSingletonScope();
|
|
42
|
+
bind(MarkerNavigator).toSelf().inSingletonScope();
|
|
43
|
+
configureActionHandler({ bind, isBound }, NavigateToMarkerAction.KIND, NavigateToMarkerActionHandler);
|
|
44
|
+
},
|
|
45
|
+
{ featureId: Symbol('markerNavigator') }
|
|
46
|
+
);
|
|
41
47
|
|
|
42
48
|
/**
|
|
43
49
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -49,5 +55,5 @@ export const standaloneMarkerNavigatorModule = new FeatureModule(
|
|
|
49
55
|
bindAsService(bind, TYPES.IContextMenuProvider, MarkerNavigatorContextMenuItemProvider);
|
|
50
56
|
bindAsService(bind, TYPES.KeyListener, MarkerNavigatorKeyListener);
|
|
51
57
|
},
|
|
52
|
-
{ requires: markerNavigatorModule }
|
|
58
|
+
{ featureId: Symbol('standaloneMarkerNavigator'), requires: markerNavigatorModule }
|
|
53
59
|
);
|