@eclipse-glsp/client 2.2.0-next.343 → 2.2.0-next.345
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 +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +10 -8
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +6 -4
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.js +8 -8
- package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +6 -4
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +6 -6
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -1
- package/lib/features/accessibility/key-shortcut/{di.config.d.ts → shortcut-help-module.d.ts} +7 -5
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/{di.config.js → shortcut-help-module.js} +6 -6
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.js.map +1 -0
- 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/toast/toast-module.d.ts +6 -4
- package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -1
- package/lib/features/accessibility/toast/toast-module.js +5 -5
- package/lib/features/accessibility/toast/toast-module.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +3 -3
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.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/change-bounds/model.d.ts +7 -4
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +12 -11
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +2 -2
- 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-manager-default.js +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/select/select-mouse-listener.js +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-manager.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.js +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 +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +3 -3
- package/lib/features/tools/change-bounds/change-bounds-tool.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts +6 -6
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.js +2 -2
- package/lib/features/tools/change-bounds/view.d.ts +8 -5
- package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/view.js +8 -7
- package/lib/features/tools/change-bounds/view.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/undo-redo/undo-redo-module.d.ts +3 -3
- package/lib/features/undo-redo/undo-redo-module.d.ts.map +1 -1
- package/lib/features/undo-redo/undo-redo-module.js +3 -4
- package/lib/features/undo-redo/undo-redo-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/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/standalone-modules.d.ts +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 +25 -20
- package/src/features/accessibility/element-navigation/element-navigation-module.ts +17 -10
- package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +14 -7
- package/src/features/accessibility/key-shortcut/{di.config.ts → shortcut-help-module.ts} +14 -7
- 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/toast/toast-module.ts +14 -7
- package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +8 -8
- 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/change-bounds/model.ts +17 -12
- package/src/features/change-bounds/movement-restrictor.ts +3 -3
- 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-manager-default.ts +2 -2
- 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/select/select-mouse-listener.ts +2 -2
- 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-manager.ts +2 -2
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +13 -10
- package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +3 -3
- package/src/features/tools/change-bounds/change-bounds-tool.ts +4 -4
- package/src/features/tools/change-bounds/change-bounds-tracker.ts +6 -6
- package/src/features/tools/change-bounds/view.tsx +11 -6
- 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/undo-redo/undo-redo-module.ts +8 -6
- package/src/features/validation/validation-modules.ts +19 -13
- package/src/features/viewport/viewport-modules.ts +20 -17
- package/src/index.ts +1 -1
- package/src/standalone-modules.ts +12 -9
- package/src/views/base-view-module.ts +7 -4
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/key-shortcut/di.config.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
2
|
+
* Copyright (c) 2023-2024 Business Informatics Group (TU Wien) and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,24 +13,31 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
import { BindingContext, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
18
|
-
import { PositionNavigator } from './position-navigator';
|
|
19
|
-
import { LocalElementNavigator } from './local-element-navigator';
|
|
20
|
-
import { ElementNavigatorTool } from './diagram-navigation-tool';
|
|
16
|
+
import { BindingContext, FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
21
17
|
import '../../../../css/navigation.css';
|
|
18
|
+
import { ElementNavigatorTool } from './diagram-navigation-tool';
|
|
19
|
+
import { LocalElementNavigator } from './local-element-navigator';
|
|
20
|
+
import { PositionNavigator } from './position-navigator';
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Handles element navigation actions.
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
export const elementNavigationModule = new FeatureModule(
|
|
27
|
+
(bind, unbind, isBound, rebind) => {
|
|
28
|
+
const context = { bind, unbind, isBound, rebind };
|
|
29
|
+
configureElementNavigationTool(context);
|
|
30
|
+
},
|
|
31
|
+
{ featureId: Symbol('elementNavigation') }
|
|
32
|
+
);
|
|
31
33
|
|
|
32
34
|
export function configureElementNavigationTool(context: BindingContext): void {
|
|
33
35
|
bindAsService(context, TYPES.IDefaultTool, ElementNavigatorTool);
|
|
34
36
|
bindAsService(context, TYPES.IElementNavigator, PositionNavigator);
|
|
35
37
|
bindAsService(context, TYPES.ILocalElementNavigator, LocalElementNavigator);
|
|
36
38
|
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
/** Deprecated use {@link elementNavigationModule} instead */
|
|
42
|
+
elementNavigationModule as glspElementNavigationModule
|
|
43
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
2
|
+
* Copyright (c) 2023-2024 Business Informatics Group (TU Wien) and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -14,19 +14,26 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { BindingContext, FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { FocusTrackerTool } from './focus-tracker-tool';
|
|
19
|
-
import { BindingContext, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Handles actions for tracking the focus of the cursor.
|
|
23
22
|
*/
|
|
24
23
|
|
|
25
|
-
export const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const focusTrackerModule = new FeatureModule(
|
|
25
|
+
(bind, unbind, isBound, rebind) => {
|
|
26
|
+
const context = { bind, unbind, isBound, rebind };
|
|
27
|
+
configureFocusTrackerTool(context);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('focusTracker') }
|
|
30
|
+
);
|
|
29
31
|
|
|
30
32
|
export function configureFocusTrackerTool(context: BindingContext): void {
|
|
31
33
|
bindAsService(context, TYPES.IDefaultTool, FocusTrackerTool);
|
|
32
34
|
}
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
/** Deprecated use {@link focusTrackerModule} instead */
|
|
38
|
+
focusTrackerModule as glspFocusTrackerModule
|
|
39
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
2
|
+
* Copyright (c) 2023-2024 Business Informatics Group (TU Wien) and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { bindAsService, BindingContext, configureActionHandler, TYPES } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
19
18
|
import '../../../../css/key-shortcut.css';
|
|
20
19
|
import { KeyShortcutUIExtension, SetAccessibleKeyShortcutAction } from './accessible-key-shortcut';
|
|
21
20
|
import { AccessibleKeyShortcutTool } from './accessible-key-shortcut-tool';
|
|
@@ -23,13 +22,21 @@ import { AccessibleKeyShortcutTool } from './accessible-key-shortcut-tool';
|
|
|
23
22
|
/**
|
|
24
23
|
* Handles actions for displaying help/information about keyboard shortcuts.
|
|
25
24
|
*/
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
export const shortcutHelpModule = new FeatureModule(
|
|
26
|
+
(bind, unbind, isBound, rebind) => {
|
|
27
|
+
const context = { bind, unbind, isBound, rebind };
|
|
28
|
+
configureShortcutHelpTool(context);
|
|
29
|
+
},
|
|
30
|
+
{ featureId: Symbol('shortcutHelp') }
|
|
31
|
+
);
|
|
30
32
|
|
|
31
33
|
export function configureShortcutHelpTool(context: BindingContext): void {
|
|
32
34
|
bindAsService(context, TYPES.IDefaultTool, AccessibleKeyShortcutTool);
|
|
33
35
|
bindAsService(context, TYPES.IUIExtension, KeyShortcutUIExtension);
|
|
34
36
|
configureActionHandler(context, SetAccessibleKeyShortcutAction.KIND, KeyShortcutUIExtension);
|
|
35
37
|
}
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
/** Deprecated use {@link shortcutHelpModule} instead */
|
|
41
|
+
shortcutHelpModule as glspShortcutHelpModule
|
|
42
|
+
};
|
|
@@ -14,32 +14,35 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import {
|
|
17
|
+
BindingContext,
|
|
18
|
+
FeatureModule,
|
|
17
19
|
TYPES,
|
|
18
|
-
|
|
19
|
-
configureActionHandler,
|
|
20
|
+
TriggerEdgeCreationAction,
|
|
20
21
|
TriggerNodeCreationAction,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
TriggerEdgeCreationAction
|
|
22
|
+
bindAsService,
|
|
23
|
+
configureActionHandler
|
|
24
24
|
} from '@eclipse-glsp/sprotty';
|
|
25
|
-
import {
|
|
26
|
-
import { KeyboardPointer } from './keyboard-pointer';
|
|
27
|
-
import { KeyboardGrid } from '../keyboard-grid/keyboard-grid';
|
|
28
|
-
import { SetKeyboardPointerRenderPositionAction } from './actions';
|
|
25
|
+
import { SetEdgeTargetSelectionAction } from '../edge-autocomplete/action';
|
|
29
26
|
import { EdgeAutocompletePalette } from '../edge-autocomplete/edge-autocomplete-palette';
|
|
30
27
|
import { EdgeAutocompletePaletteTool } from '../edge-autocomplete/edge-autocomplete-tool';
|
|
31
|
-
import {
|
|
28
|
+
import { GlobalKeyListenerTool } from '../global-keylistener-tool';
|
|
29
|
+
import { EnableKeyboardGridAction, KeyboardGridCellSelectedAction } from '../keyboard-grid/action';
|
|
30
|
+
import { KeyboardGrid } from '../keyboard-grid/keyboard-grid';
|
|
32
31
|
import { GridSearchPalette } from '../keyboard-grid/keyboard-grid-search-palette';
|
|
33
32
|
import { KeyboardNodeGrid } from '../keyboard-grid/keyboard-node-grid';
|
|
34
|
-
import {
|
|
33
|
+
import { SetKeyboardPointerRenderPositionAction } from './actions';
|
|
34
|
+
import { KeyboardPointer } from './keyboard-pointer';
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Handles the pointer used via grid to position new elements.
|
|
38
38
|
*/
|
|
39
|
-
export const keyboardControlModule = new FeatureModule(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
export const keyboardControlModule = new FeatureModule(
|
|
40
|
+
(bind, unbind, isBound, rebind) => {
|
|
41
|
+
const context = { bind, unbind, isBound, rebind };
|
|
42
|
+
configureKeyboardControlTools(context);
|
|
43
|
+
},
|
|
44
|
+
{ featureId: Symbol('keyboardControl') }
|
|
45
|
+
);
|
|
43
46
|
|
|
44
47
|
export function configureKeyboardControlTools(context: BindingContext): void {
|
|
45
48
|
bindAsService(context, TYPES.IDefaultTool, GlobalKeyListenerTool);
|
|
@@ -29,10 +29,13 @@ import { EnableToolPaletteAction } from '../../tool-palette/tool-palette';
|
|
|
29
29
|
import { FocusDomAction } from '../actions';
|
|
30
30
|
import { KeyboardToolPalette } from './keyboard-tool-palette';
|
|
31
31
|
|
|
32
|
-
export const keyboardToolPaletteModule = new FeatureModule(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
export const keyboardToolPaletteModule = new FeatureModule(
|
|
33
|
+
(bind, unbind, isBound, rebind) => {
|
|
34
|
+
const context = { bind, unbind, isBound, rebind };
|
|
35
|
+
configureKeyboardToolPaletteTool(context);
|
|
36
|
+
},
|
|
37
|
+
{ featureId: Symbol('keyboardToolPalette') }
|
|
38
|
+
);
|
|
36
39
|
|
|
37
40
|
export function configureKeyboardToolPaletteTool(context: BindingContext): void {
|
|
38
41
|
bindAsService(context, TYPES.IUIExtension, KeyboardToolPalette);
|
|
@@ -21,10 +21,13 @@ import { ZoomElementAction, ZoomElementHandler, ZoomViewportAction, ZoomViewport
|
|
|
21
21
|
/**
|
|
22
22
|
* Handles move and zoom actions.
|
|
23
23
|
*/
|
|
24
|
-
export const moveZoomModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
export const moveZoomModule = new FeatureModule(
|
|
25
|
+
(bind, unbind, isBound, rebind) => {
|
|
26
|
+
const context = { bind, unbind, isBound, rebind };
|
|
27
|
+
configureMoveZoom(context);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('moveZoom') }
|
|
30
|
+
);
|
|
28
31
|
|
|
29
32
|
export function configureMoveZoom(context: BindingContext): void {
|
|
30
33
|
context.bind(MoveViewportHandler).toSelf().inSingletonScope();
|
|
@@ -21,10 +21,13 @@ import { ResizeKeyTool } from './resize-key-tool';
|
|
|
21
21
|
/**
|
|
22
22
|
* Handles resize actions.
|
|
23
23
|
*/
|
|
24
|
-
export const resizeKeyModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
export const resizeKeyModule = new FeatureModule(
|
|
25
|
+
(bind, unbind, isBound, rebind) => {
|
|
26
|
+
const context = { bind, unbind, isBound, rebind };
|
|
27
|
+
configureResizeTools(context);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('resizeKey') }
|
|
30
|
+
);
|
|
28
31
|
|
|
29
32
|
export function configureResizeTools(context: BindingContext): void {
|
|
30
33
|
context.bind(ResizeElementHandler).toSelf().inSingletonScope();
|
|
@@ -18,10 +18,13 @@ import { bindAsService, BindingContext, FeatureModule, TYPES } from '@eclipse-gl
|
|
|
18
18
|
import { SearchAutocompletePalette } from './search-palette';
|
|
19
19
|
import { SearchAutocompletePaletteTool } from './search-tool';
|
|
20
20
|
|
|
21
|
-
export const searchPaletteModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export const searchPaletteModule = new FeatureModule(
|
|
22
|
+
(bind, _unbind, isBound, rebind) => {
|
|
23
|
+
const context = { bind, isBound, rebind };
|
|
24
|
+
configureSearchPaletteModule(context);
|
|
25
|
+
},
|
|
26
|
+
{ featureId: Symbol('searchPalette') }
|
|
27
|
+
);
|
|
25
28
|
|
|
26
29
|
export function configureSearchPaletteModule(context: Pick<BindingContext, 'bind'>): void {
|
|
27
30
|
bindAsService(context, TYPES.IUIExtension, SearchAutocompletePalette);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
2
|
+
* Copyright (c) 2023-2024 Business Informatics Group (TU Wien) and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
import { bindAsService, BindingContext, configureActionHandler, TYPES } from '@eclipse-glsp/sprotty';
|
|
16
|
+
import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
18
17
|
import '../../../../css/toast.css';
|
|
19
18
|
import { HideToastAction, ShowToastMessageAction } from './toast-handler';
|
|
20
19
|
import { Toast } from './toast-tool';
|
|
@@ -23,10 +22,13 @@ import { Toast } from './toast-tool';
|
|
|
23
22
|
* Handles toast/user notification actions.
|
|
24
23
|
*/
|
|
25
24
|
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
export const toastModule = new FeatureModule(
|
|
26
|
+
(bind, unbind, isBound, rebind) => {
|
|
27
|
+
const context = { bind, unbind, isBound, rebind };
|
|
28
|
+
configureToastTool(context);
|
|
29
|
+
},
|
|
30
|
+
{ featureId: Symbol('toast') }
|
|
31
|
+
);
|
|
30
32
|
|
|
31
33
|
export function configureToastTool(context: BindingContext): void {
|
|
32
34
|
bindAsService(context, TYPES.IUIExtension, Toast);
|
|
@@ -34,3 +36,8 @@ export function configureToastTool(context: BindingContext): void {
|
|
|
34
36
|
configureActionHandler(context, ShowToastMessageAction.KIND, Toast);
|
|
35
37
|
configureActionHandler(context, HideToastAction.KIND, Toast);
|
|
36
38
|
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
/** Deprecated use {@link toastModule} instead */
|
|
42
|
+
toastModule as glspToastModule
|
|
43
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
2
|
+
* Copyright (c) 2023-2024 Business Informatics Group (TU Wien) and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { inject, injectable } from 'inversify';
|
|
18
|
-
import { toArray } from 'sprotty/lib/utils/iterable';
|
|
19
|
-
import { matchesKeystroke } from 'sprotty/lib/utils/keyboard';
|
|
20
17
|
import {
|
|
21
18
|
Action,
|
|
22
|
-
KeyListener,
|
|
23
|
-
KeyTool,
|
|
24
19
|
GModelElement,
|
|
25
20
|
GRoutableElement,
|
|
21
|
+
KeyListener,
|
|
22
|
+
KeyTool,
|
|
26
23
|
SelectAction,
|
|
27
24
|
SwitchEditModeAction,
|
|
28
25
|
isSelectable
|
|
29
26
|
} from '@eclipse-glsp/sprotty';
|
|
27
|
+
import { inject, injectable } from 'inversify';
|
|
28
|
+
import { toArray } from 'sprotty/lib/utils/iterable';
|
|
29
|
+
import { matchesKeystroke } from 'sprotty/lib/utils/keyboard';
|
|
30
30
|
import { Tool } from '../../../base/tool-manager/tool';
|
|
31
|
-
import {
|
|
31
|
+
import { GResizeHandle } from '../../change-bounds/model';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Deselects the element if there is no interaction possible with element.
|
|
@@ -59,7 +59,7 @@ export class DeselectKeyTool implements Tool {
|
|
|
59
59
|
export class DeselectKeyListener extends KeyListener {
|
|
60
60
|
override keyDown(target: GModelElement, event: KeyboardEvent): Action[] {
|
|
61
61
|
if (this.matchesDeselectKeystroke(event)) {
|
|
62
|
-
const isResizeHandleActive = toArray(target.root.index.all().filter(el => el instanceof
|
|
62
|
+
const isResizeHandleActive = toArray(target.root.index.all().filter(el => el instanceof GResizeHandle)).length > 0;
|
|
63
63
|
|
|
64
64
|
if (isResizeHandleActive) {
|
|
65
65
|
return [];
|
|
@@ -15,15 +15,20 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
18
|
+
import { KeyboardGridCellSelectedAction, KeyboardGridKeyboardEventAction } from '../keyboard-grid/action';
|
|
18
19
|
import { DeselectKeyTool } from './deselect-key-tool';
|
|
19
20
|
import { MovementKeyTool } from './movement-key-tool';
|
|
20
21
|
import { ZoomKeyTool } from './zoom-key-tool';
|
|
21
|
-
import { KeyboardGridCellSelectedAction, KeyboardGridKeyboardEventAction } from '../keyboard-grid/action';
|
|
22
22
|
|
|
23
|
-
export const viewKeyToolsModule = new FeatureModule(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
export const viewKeyToolsModule = new FeatureModule(
|
|
24
|
+
(bind, _unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, isBound, rebind };
|
|
26
|
+
configureViewKeyTools(context);
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
featureId: Symbol('viewKeyTools')
|
|
30
|
+
}
|
|
31
|
+
);
|
|
27
32
|
|
|
28
33
|
export function configureViewKeyTools(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
|
|
29
34
|
bindAsService(context, TYPES.IDefaultTool, MovementKeyTool);
|
|
@@ -35,24 +35,27 @@ import { LocalComputedBoundsCommand } from './local-bounds';
|
|
|
35
35
|
import { SetBoundsFeedbackCommand } from './set-bounds-feedback-command';
|
|
36
36
|
import { VBoxLayouterExt } from './vbox-layout';
|
|
37
37
|
|
|
38
|
-
export const boundsModule = new FeatureModule(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
export const boundsModule = new FeatureModule(
|
|
39
|
+
(bind, _unbind, isBound, _rebind) => {
|
|
40
|
+
const context = { bind, isBound };
|
|
41
|
+
configureCommand(context, SetBoundsCommand);
|
|
42
|
+
configureCommand(context, RequestBoundsCommand);
|
|
43
|
+
bind(HiddenBoundsUpdater).toSelf().inSingletonScope();
|
|
44
|
+
bindAsService(context, TYPES.HiddenVNodePostprocessor, GLSPHiddenBoundsUpdater);
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
configureCommand(context, LocalComputedBoundsCommand);
|
|
47
|
+
configureCommand(context, SetBoundsFeedbackCommand);
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
bind(TYPES.Layouter).to(LayouterExt).inSingletonScope();
|
|
50
|
+
bind(TYPES.LayoutRegistry).to(LayoutRegistry).inSingletonScope();
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
configureLayout(context, VBoxLayouter.KIND, VBoxLayouterExt);
|
|
53
|
+
configureLayout(context, HBoxLayouter.KIND, HBoxLayouterExt);
|
|
54
|
+
configureLayout(context, FreeFormLayouter.KIND, FreeFormLayouter);
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
56
|
+
// backwards compatibility
|
|
57
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
58
|
+
bind(PositionSnapper).toSelf();
|
|
59
|
+
},
|
|
60
|
+
{ featureId: Symbol('bounds') }
|
|
61
|
+
);
|
|
@@ -109,14 +109,14 @@ export function isBoundsAwareMoveable(element: GModelElement): element is Bounds
|
|
|
109
109
|
return isMoveable(element) && isBoundsAware(element);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
export class
|
|
112
|
+
export class GResizeHandle extends GChildElement implements Hoverable {
|
|
113
113
|
static readonly TYPE = 'resize-handle';
|
|
114
114
|
|
|
115
115
|
override readonly parent: ResizableModelElement;
|
|
116
116
|
|
|
117
117
|
constructor(
|
|
118
118
|
readonly location: ResizeHandleLocation,
|
|
119
|
-
override readonly type: string =
|
|
119
|
+
override readonly type: string = GResizeHandle.TYPE,
|
|
120
120
|
readonly hoverFeedback: boolean = false
|
|
121
121
|
) {
|
|
122
122
|
super();
|
|
@@ -166,12 +166,12 @@ export class SResizeHandle extends GChildElement implements Hoverable {
|
|
|
166
166
|
return this.isNeResize() || this.isSwResize();
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
static getHandlePosition(handle:
|
|
169
|
+
static getHandlePosition(handle: GResizeHandle): Point;
|
|
170
170
|
static getHandlePosition(parent: ResizableModelElement, location: ResizeHandleLocation): Point;
|
|
171
171
|
static getHandlePosition(bounds: Bounds, location: ResizeHandleLocation): Point;
|
|
172
|
-
static getHandlePosition(first: ResizableModelElement |
|
|
173
|
-
const bounds =
|
|
174
|
-
const location =
|
|
172
|
+
static getHandlePosition(first: ResizableModelElement | GResizeHandle | Bounds, second?: ResizeHandleLocation): Point {
|
|
173
|
+
const bounds = GResizeHandle.is(first) ? first.parent.bounds : first instanceof GModelElement ? first.bounds : first;
|
|
174
|
+
const location = GResizeHandle.is(first) ? first.location : second!;
|
|
175
175
|
switch (location) {
|
|
176
176
|
case ResizeHandleLocation.TopLeft:
|
|
177
177
|
return Bounds.topLeft(bounds);
|
|
@@ -192,7 +192,7 @@ export class SResizeHandle extends GChildElement implements Hoverable {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
static getCursorCss(handle:
|
|
195
|
+
static getCursorCss(handle: GResizeHandle): string {
|
|
196
196
|
switch (handle.location) {
|
|
197
197
|
case ResizeHandleLocation.TopLeft:
|
|
198
198
|
return CursorCSS.RESIZE_NW;
|
|
@@ -213,17 +213,17 @@ export class SResizeHandle extends GChildElement implements Hoverable {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
static is(handle: unknown): handle is
|
|
217
|
-
return typeof handle === 'object' && !!handle && 'type' in handle && handle.type ===
|
|
216
|
+
static is(handle: unknown): handle is GResizeHandle {
|
|
217
|
+
return typeof handle === 'object' && !!handle && 'type' in handle && handle.type === GResizeHandle.TYPE;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export function addResizeHandles(element: ResizableModelElement, locations: ResizeHandleLocation[] = ResizeHandleLocation.CORNERS): void {
|
|
222
222
|
for (const location of ResizeHandleLocation.ALL) {
|
|
223
|
-
const existing = element.children.find(child => child instanceof
|
|
223
|
+
const existing = element.children.find(child => child instanceof GResizeHandle && child.location === location);
|
|
224
224
|
if (locations.includes(location) && !existing) {
|
|
225
225
|
// add missing handle
|
|
226
|
-
element.add(new
|
|
226
|
+
element.add(new GResizeHandle(location));
|
|
227
227
|
} else if (!locations.includes(location) && existing) {
|
|
228
228
|
// remove existing handle
|
|
229
229
|
element.remove(existing);
|
|
@@ -232,5 +232,10 @@ export function addResizeHandles(element: ResizableModelElement, locations: Resi
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
export function removeResizeHandles(element: GParentElement): void {
|
|
235
|
-
element.removeAll(child => child instanceof
|
|
235
|
+
element.removeAll(child => child instanceof GResizeHandle);
|
|
236
236
|
}
|
|
237
|
+
|
|
238
|
+
export {
|
|
239
|
+
/** @deprecated Use {@link GResizeHandle} instead */
|
|
240
|
+
GResizeHandle as SResizeHandle
|
|
241
|
+
};
|
|
@@ -18,7 +18,7 @@ import { injectable } from 'inversify';
|
|
|
18
18
|
import { ModifyCSSFeedbackAction } from '../../base/feedback/css-feedback';
|
|
19
19
|
import { BoundsAwareModelElement } from '../../utils/gmodel-util';
|
|
20
20
|
import { toAbsoluteBounds } from '../../utils/viewpoint-util';
|
|
21
|
-
import {
|
|
21
|
+
import { GResizeHandle } from './model';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* A `MovementRestrictor` is an optional service that can be used by tools to validate
|
|
@@ -86,7 +86,7 @@ export function createMovementRestrictionFeedback(
|
|
|
86
86
|
): ModifyCSSFeedbackAction {
|
|
87
87
|
const elements: GModelElement[] = [element];
|
|
88
88
|
if (element instanceof GParentElement) {
|
|
89
|
-
element.children.filter(child => child instanceof
|
|
89
|
+
element.children.filter(child => child instanceof GResizeHandle).forEach(e => elements.push(e));
|
|
90
90
|
}
|
|
91
91
|
return ModifyCSSFeedbackAction.create({ elements, add: movementRestrictor.cssClasses });
|
|
92
92
|
}
|
|
@@ -103,7 +103,7 @@ export function removeMovementRestrictionFeedback(
|
|
|
103
103
|
): ModifyCSSFeedbackAction {
|
|
104
104
|
const elements: GModelElement[] = [element];
|
|
105
105
|
if (element instanceof GParentElement) {
|
|
106
|
-
element.children.filter(child => child instanceof
|
|
106
|
+
element.children.filter(child => child instanceof GResizeHandle).forEach(e => elements.push(e));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
return ModifyCSSFeedbackAction.create({ elements, remove: movementRestrictor.cssClasses });
|
|
@@ -19,9 +19,12 @@ import { GlspCommandPalette } from './command-palette';
|
|
|
19
19
|
import { CommandPaletteTool } from './command-palette-tool';
|
|
20
20
|
import { ServerCommandPaletteActionProvider } from './server-command-palette-provider';
|
|
21
21
|
|
|
22
|
-
export const commandPaletteModule = new FeatureModule(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
export const commandPaletteModule = new FeatureModule(
|
|
23
|
+
bind => {
|
|
24
|
+
bindAsService(bind, TYPES.IUIExtension, GlspCommandPalette);
|
|
25
|
+
bind(TYPES.ICommandPaletteActionProviderRegistry).to(CommandPaletteActionProviderRegistry).inSingletonScope();
|
|
26
|
+
bindAsService(bind, TYPES.ICommandPaletteActionProvider, ServerCommandPaletteActionProvider);
|
|
27
|
+
bindAsService(bind, TYPES.IDefaultTool, CommandPaletteTool);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('commandPalette') }
|
|
30
|
+
);
|
|
@@ -17,17 +17,20 @@ import { ContextMenuProviderRegistry, FeatureModule, IContextMenuService, TYPES,
|
|
|
17
17
|
import { GLSPContextMenuMouseListener } from './glsp-context-menu-mouse-listener';
|
|
18
18
|
import { ServerContextMenuItemProvider } from './server-context-menu-provider';
|
|
19
19
|
|
|
20
|
-
export const contextMenuModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
export const contextMenuModule = new FeatureModule(
|
|
21
|
+
bind => {
|
|
22
|
+
bind(TYPES.IContextMenuServiceProvider).toProvider<IContextMenuService>(ctx => async () => {
|
|
23
|
+
if (ctx.container.isBound(TYPES.IContextMenuService)) {
|
|
24
|
+
return ctx.container.get<IContextMenuService>(TYPES.IContextMenuService);
|
|
25
|
+
}
|
|
26
|
+
console.warn("'TYPES.IContextMenuService' is not bound. Use no-op implementation instead");
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
28
|
+
return { show: () => {} };
|
|
29
|
+
});
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
31
|
+
bindAsService(bind, TYPES.MouseListener, GLSPContextMenuMouseListener);
|
|
32
|
+
bind(TYPES.IContextMenuProviderRegistry).to(ContextMenuProviderRegistry);
|
|
33
|
+
bindAsService(bind, TYPES.IContextMenuItemProvider, ServerContextMenuItemProvider);
|
|
34
|
+
},
|
|
35
|
+
{ featureId: Symbol('contextMenu') }
|
|
36
|
+
);
|
|
@@ -17,10 +17,13 @@ import { bindAsService, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
|
17
17
|
import { LocalClipboardService, ServerCopyPasteHandler } from './copy-paste-handler';
|
|
18
18
|
import { CopyPasteStartup } from './copy-paste-standalone';
|
|
19
19
|
|
|
20
|
-
export const copyPasteModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export const copyPasteModule = new FeatureModule(
|
|
21
|
+
(bind, _unbind, isBound) => {
|
|
22
|
+
bind(TYPES.ICopyPasteHandler).to(ServerCopyPasteHandler);
|
|
23
|
+
bind(TYPES.IAsyncClipboardService).to(LocalClipboardService).inSingletonScope();
|
|
24
|
+
},
|
|
25
|
+
{ featureId: Symbol('copyPaste') }
|
|
26
|
+
);
|
|
24
27
|
|
|
25
28
|
/**
|
|
26
29
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -31,5 +34,8 @@ export const standaloneCopyPasteModule = new FeatureModule(
|
|
|
31
34
|
(bind, _unbind, isBound) => {
|
|
32
35
|
bindAsService(bind, TYPES.IDiagramStartup, CopyPasteStartup);
|
|
33
36
|
},
|
|
34
|
-
{
|
|
37
|
+
{
|
|
38
|
+
featureId: Symbol('standaloneCopyPaste'),
|
|
39
|
+
requires: copyPasteModule
|
|
40
|
+
}
|
|
35
41
|
);
|
|
@@ -20,13 +20,16 @@ import { DebugBoundsDecorator } from './debug-bounds-decorator';
|
|
|
20
20
|
import { DebugManager } from './debug-manager';
|
|
21
21
|
import { EnableDebugModeAction, EnableDebugModeCommand } from './debug-model';
|
|
22
22
|
|
|
23
|
-
export const debugModule = new FeatureModule(
|
|
24
|
-
|
|
23
|
+
export const debugModule = new FeatureModule(
|
|
24
|
+
(bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
configureCommand(context, EnableDebugModeCommand);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
bind(DebugManager).toSelf().inSingletonScope();
|
|
30
|
+
configureActionHandler(context, EnableDebugModeAction.KIND, DebugManager);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
}
|
|
32
|
+
bindAsService(context, TYPES.IVNodePostprocessor, DebugBoundsDecorator);
|
|
33
|
+
},
|
|
34
|
+
{ featureId: Symbol('debug') }
|
|
35
|
+
);
|