@eclipse-glsp/client 2.3.0-next.319 → 2.3.0-next.321

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.
Files changed (79) hide show
  1. package/lib/base/action-dispatcher.d.ts +1 -1
  2. package/lib/base/action-dispatcher.js +1 -1
  3. package/lib/base/action-handler-registry.d.ts +1 -1
  4. package/lib/base/action-handler-registry.js +1 -1
  5. package/lib/base/default.module.d.ts +1 -1
  6. package/lib/base/default.module.js +1 -1
  7. package/lib/base/feedback/feedback-action-dispatcher.d.ts +1 -1
  8. package/lib/base/feedback/feedback-action-dispatcher.js +1 -1
  9. package/lib/base/feedback/feedback-command.d.ts +1 -1
  10. package/lib/base/feedback/feedback-command.js +1 -1
  11. package/lib/base/feedback/index.d.ts +1 -1
  12. package/lib/base/feedback/index.js +1 -1
  13. package/lib/base/feedback/update-model-command.d.ts +1 -1
  14. package/lib/base/feedback/update-model-command.js +1 -1
  15. package/lib/base/model/glsp-model-source.d.ts +1 -1
  16. package/lib/base/model/glsp-model-source.js +1 -1
  17. package/lib/base/ranked.d.ts +1 -1
  18. package/lib/base/ranked.js +1 -1
  19. package/lib/base/selection-service.d.ts +1 -1
  20. package/lib/base/selection-service.js +1 -1
  21. package/lib/base/selection-service.spec.js +1 -1
  22. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +1 -1
  23. package/lib/features/bounds/glsp-hidden-bounds-updater.js +1 -1
  24. package/lib/features/bounds/local-bounds.d.ts +1 -1
  25. package/lib/features/bounds/local-bounds.js +1 -1
  26. package/lib/features/bounds/set-bounds-feedback-command.d.ts +1 -1
  27. package/lib/features/bounds/set-bounds-feedback-command.js +1 -1
  28. package/lib/features/change-bounds/position-snapper.d.ts +1 -1
  29. package/lib/features/change-bounds/position-snapper.js +1 -1
  30. package/lib/features/element-template/add-template-element.d.ts +1 -1
  31. package/lib/features/element-template/add-template-element.js +1 -1
  32. package/lib/features/helper-lines/helper-line-feedback.d.ts +1 -1
  33. package/lib/features/helper-lines/helper-line-feedback.js +1 -1
  34. package/lib/features/helper-lines/helper-line-manager-default.d.ts +1 -1
  35. package/lib/features/helper-lines/helper-line-manager-default.js +1 -1
  36. package/lib/features/helper-lines/helper-line-manager.d.ts +1 -1
  37. package/lib/features/hints/type-hint-provider.d.ts +1 -1
  38. package/lib/features/hints/type-hint-provider.js +1 -1
  39. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts +1 -1
  40. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js +1 -1
  41. package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts +1 -1
  42. package/lib/features/tools/marquee-selection/marquee-behavior.spec.js +1 -1
  43. package/lib/features/validation/validate.d.ts +20 -2
  44. package/lib/features/validation/validate.d.ts.map +1 -1
  45. package/lib/features/validation/validate.js +13 -10
  46. package/lib/features/validation/validate.js.map +1 -1
  47. package/lib/tsconfig.tsbuildinfo +1 -1
  48. package/lib/utils/contribution-provider.d.ts +1 -1
  49. package/lib/utils/contribution-provider.js +1 -1
  50. package/lib/utils/gmodel-util.d.ts +1 -1
  51. package/lib/utils/gmodel-util.js +1 -1
  52. package/lib/utils/html-utils.js +1 -1
  53. package/package.json +3 -3
  54. package/src/base/action-dispatcher.ts +1 -1
  55. package/src/base/action-handler-registry.ts +1 -1
  56. package/src/base/default.module.ts +1 -1
  57. package/src/base/feedback/feedback-action-dispatcher.ts +1 -1
  58. package/src/base/feedback/feedback-command.ts +1 -1
  59. package/src/base/feedback/index.ts +1 -1
  60. package/src/base/feedback/update-model-command.ts +1 -1
  61. package/src/base/model/glsp-model-source.ts +1 -1
  62. package/src/base/ranked.ts +1 -1
  63. package/src/base/selection-service.spec.ts +1 -1
  64. package/src/base/selection-service.ts +1 -1
  65. package/src/features/bounds/glsp-hidden-bounds-updater.ts +1 -1
  66. package/src/features/bounds/local-bounds.ts +1 -1
  67. package/src/features/bounds/set-bounds-feedback-command.ts +1 -1
  68. package/src/features/change-bounds/position-snapper.ts +1 -1
  69. package/src/features/element-template/add-template-element.ts +1 -1
  70. package/src/features/helper-lines/helper-line-feedback.ts +1 -1
  71. package/src/features/helper-lines/helper-line-manager-default.ts +1 -1
  72. package/src/features/helper-lines/helper-line-manager.ts +1 -1
  73. package/src/features/hints/type-hint-provider.ts +1 -1
  74. package/src/features/tools/change-bounds/change-bounds-tool-feedback.ts +1 -1
  75. package/src/features/tools/marquee-selection/marquee-behavior.spec.ts +1 -1
  76. package/src/features/validation/validate.ts +18 -11
  77. package/src/utils/contribution-provider.ts +1 -1
  78. package/src/utils/gmodel-util.ts +1 -1
  79. package/src/utils/html-utils.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*******************************************************************************
2
- * Copyright (C) 2017 TypeFox and others.
2
+ * Copyright (c) 2017-2024 TypeFox and others.
3
3
  * Modifications: (c) 2024 EclipseSource and others.
4
4
  *
5
5
  * This program and the accompanying materials are made available under the
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*******************************************************************************
3
- * Copyright (C) 2017 TypeFox and others.
3
+ * Copyright (c) 2017-2024 TypeFox and others.
4
4
  * Modifications: (c) 2024 EclipseSource and others.
5
5
  *
6
6
  * This program and the accompanying materials are made available under the
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getDescendantIds = exports.isVisibleOnCanvas = exports.calculateDeltaBetweenPoints = exports.findTopLevelElementByFeature = exports.getElementTypeId = exports.calcRoute = exports.calcElementAndRoute = exports.calcElementAndRoutingPoints = exports.ROUTE_KINDS = exports.ROUTING_POINT_KINDS = exports.ALL_ROUTING_POINTS = exports.toElementAndRoutingPoints = exports.toElementAndBounds = exports.isSelectableAndBoundsAware = exports.isRoutingHandle = exports.isRoutable = exports.isNonRoutableSelectedBoundsAware = exports.isNonRoutableSelectedMovableBoundsAware = exports.removeCssClasses = exports.addCssClasses = exports.isNotUndefined = exports.hasSelectedElements = exports.getSelectedElementCount = exports.getElements = exports.getMatchingElements = exports.forEachElement = exports.filter = void 0;
4
4
  /********************************************************************************
5
- * Copyright (c) 2019-2023 EclipseSource and others.
5
+ * Copyright (c) 2019-2024 EclipseSource and others.
6
6
  *
7
7
  * This program and the accompanying materials are made available under the
8
8
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isMouseEvent = exports.createElementFromHTML = void 0;
4
4
  /********************************************************************************
5
- * Copyright (c) 2019-2020 EclipseSource and others.
5
+ * Copyright (c) 2019-2023 EclipseSource and others.
6
6
  *
7
7
  * This program and the accompanying materials are made available under the
8
8
  * terms of the Eclipse Public License v. 2.0 which is available at
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/client",
3
- "version": "2.3.0-next.319+5e43503",
3
+ "version": "2.3.0-next.321+e4c9bbd",
4
4
  "description": "A sprotty-based client for GLSP",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -47,7 +47,7 @@
47
47
  "watch": "tsc -w"
48
48
  },
49
49
  "dependencies": {
50
- "@eclipse-glsp/sprotty": "2.3.0-next.319+5e43503",
50
+ "@eclipse-glsp/sprotty": "2.3.0-next.321+e4c9bbd",
51
51
  "autocompleter": "^9.1.0",
52
52
  "file-saver": "^2.0.5",
53
53
  "lodash": "4.17.21"
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "5e435038399d7acf5408a64348e212b8393ea205"
62
+ "gitHead": "e4c9bbde9a49f33c9cae388e7a1ac844409c43d0"
63
63
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2023 EclipseSource and others.
2
+ * Copyright (c) 2020-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2023 EclipseSource and others.
2
+ * Copyright (c) 2022-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 EclipseSource and others.
2
+ * Copyright (c) 2023-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2021 EclipseSource and others.
2
+ * Copyright (c) 2021-2023 EclipseSource 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,26 +13,26 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { inject, injectable, optional } from 'inversify';
17
16
  import {
18
17
  Action,
19
18
  CommandExecutionContext,
20
19
  CommandReturn,
21
20
  DeleteMarkersAction,
21
+ GParentElement,
22
22
  IActionDispatcher,
23
23
  IActionHandler,
24
24
  ICommand,
25
25
  Marker,
26
- GParentElement,
27
26
  SetMarkersAction,
28
27
  TYPES,
29
28
  hasArrayProp
30
29
  } from '@eclipse-glsp/sprotty';
30
+ import { inject, injectable, optional } from 'inversify';
31
31
  import { EditorContextService } from '../../base/editor-context-service';
32
32
  import { IFeedbackActionDispatcher, IFeedbackEmitter } from '../../base/feedback/feedback-action-dispatcher';
33
33
  import { FeedbackCommand } from '../../base/feedback/feedback-command';
34
34
  import { removeCssClasses } from '../../utils/gmodel-util';
35
- import { GIssueMarker, createGIssue, getOrCreateGIssueMarker, getGIssueMarker, getSeverity } from './issue-marker';
35
+ import { GIssueMarker, createGIssue, getGIssueMarker, getOrCreateGIssueMarker, getSeverity } from './issue-marker';
36
36
 
37
37
  /**
38
38
  * Feedback emitter sending actions for visualizing model validation feedback and
@@ -42,9 +42,7 @@ import { GIssueMarker, createGIssue, getOrCreateGIssueMarker, getGIssueMarker, g
42
42
  export class ValidationFeedbackEmitter implements IFeedbackEmitter {
43
43
  @inject(TYPES.IFeedbackActionDispatcher) protected feedbackActionDispatcher: IFeedbackActionDispatcher;
44
44
 
45
- @inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
46
-
47
- protected registeredFeedbackByReason: Map<string, ApplyMarkersAction> = new Map();
45
+ protected registeredFeedbackByReason: Map<string, { action: ApplyMarkersAction; emitter: IFeedbackEmitter }> = new Map();
48
46
 
49
47
  /**
50
48
  * Register the action that should be emitted for visualizing validation feedback.
@@ -54,15 +52,24 @@ export class ValidationFeedbackEmitter implements IFeedbackEmitter {
54
52
  registerValidationFeedbackAction(action: ApplyMarkersAction, reason = ''): void {
55
53
  // De-register feedback and clear existing markers with the same reason
56
54
  const previousFeedbackWithSameReason = this.registeredFeedbackByReason.get(reason);
55
+ let emitter: IFeedbackEmitter | undefined;
57
56
  if (previousFeedbackWithSameReason) {
58
- this.feedbackActionDispatcher.deregisterFeedback(this, [previousFeedbackWithSameReason]);
59
- const deleteMarkersAction = DeleteMarkersAction.create(previousFeedbackWithSameReason.markers);
60
- this.actionDispatcher().then(dispatcher => dispatcher.dispatch(deleteMarkersAction));
57
+ emitter = previousFeedbackWithSameReason.emitter;
58
+ const deleteMarkersAction = DeleteMarkersAction.create(previousFeedbackWithSameReason.action.markers);
59
+ this.feedbackActionDispatcher.deregisterFeedback(emitter, [deleteMarkersAction]);
60
+ }
61
+
62
+ if (!emitter) {
63
+ emitter = this.createEmitter(reason);
61
64
  }
62
65
 
63
66
  // Register new action responsible for applying markers and re-applying them when the model is updated
64
- this.registeredFeedbackByReason.set(reason, action);
65
- this.feedbackActionDispatcher.registerFeedback(this, [...this.registeredFeedbackByReason.values()]);
67
+ this.registeredFeedbackByReason.set(reason, { action, emitter });
68
+ this.feedbackActionDispatcher.registerFeedback(emitter, [action]);
69
+ }
70
+
71
+ protected createEmitter(reason: string): IFeedbackEmitter {
72
+ return { id: 'validationFeedbackEmitter_' + reason };
66
73
  }
67
74
  }
68
75
 
@@ -1,5 +1,5 @@
1
1
  /*******************************************************************************
2
- * Copyright (C) 2017 TypeFox and others.
2
+ * Copyright (c) 2017-2024 TypeFox and others.
3
3
  * Modifications: (c) 2024 EclipseSource and others.
4
4
  *
5
5
  * This program and the accompanying materials are made available under the
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource 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
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2020 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 EclipseSource 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