@eclipse-glsp/server 2.5.0-next.125 → 2.5.0-next.126

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.
@@ -14,16 +14,17 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { GModelRoot } from '@eclipse-glsp/graph';
17
- import { MaybePromise } from '@eclipse-glsp/protocol';
17
+ import { LayoutOperation, MaybePromise } from '@eclipse-glsp/protocol';
18
18
  /**
19
19
  * A layout engine is able to compute layout information for a model.
20
20
  */
21
21
  export interface LayoutEngine {
22
22
  /**
23
23
  * Computes a layout for the model state and modify the model accordingly.
24
+ * @param operation the operation that triggered this layout
24
25
  * @returns the layouted {@link GModelRoot}.
25
26
  */
26
- layout(): MaybePromise<GModelRoot>;
27
+ layout(operation?: LayoutOperation): MaybePromise<GModelRoot>;
27
28
  }
28
29
  export declare const LayoutEngine: unique symbol;
29
30
  //# sourceMappingURL=layout-engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout-engine.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,MAAM,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,YAAY,eAAyB,CAAC"}
1
+ {"version":3,"file":"layout-engine.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CACjE;AAED,eAAO,MAAM,YAAY,eAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-engine.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-engine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAgBrE,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"layout-engine.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-engine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAiBrE,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
@@ -13,7 +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 { LayoutOperation, MaybePromise, Operation } from '@eclipse-glsp/protocol';
16
+ import { LayoutOperation, MaybePromise } from '@eclipse-glsp/protocol';
17
17
  import { Command } from '../../command/command';
18
18
  import { DiagramConfiguration } from '../../diagram/diagram-configuration';
19
19
  import { OperationHandler } from '../../operations/operation-handler';
@@ -32,6 +32,6 @@ export declare class LayoutOperationHandler extends OperationHandler {
32
32
  protected serializer: GModelSerializer;
33
33
  readonly operationType = "layout";
34
34
  createCommand(operation: LayoutOperation): MaybePromise<Command | undefined>;
35
- protected executeOperation(_operation: Operation): Promise<void>;
35
+ protected executeOperation(operation: LayoutOperation): Promise<void>;
36
36
  }
37
37
  //# sourceMappingURL=layout-operation-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout-operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AACH,qBACa,sBAAuB,SAAQ,gBAAgB;IAExD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAIzB,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAGtC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAEvC,QAAQ,CAAC,aAAa,YAAwB;IAE9C,aAAa,CAAC,SAAS,EAAE,eAAe,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;cAW5D,gBAAgB,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzE"}
1
+ {"version":3,"file":"layout-operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AACH,qBACa,sBAAuB,SAAQ,gBAAgB;IAExD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAIzB,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAGtC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAEvC,QAAQ,CAAC,aAAa,YAAwB;IAE9C,aAAa,CAAC,SAAS,EAAE,eAAe,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;cAW5D,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9E"}
@@ -53,9 +53,9 @@ let LayoutOperationHandler = class LayoutOperationHandler extends operation_hand
53
53
  }
54
54
  return new recording_command_1.GModelRecordingCommand(this.modelState, this.serializer, () => this.executeOperation(operation));
55
55
  }
56
- async executeOperation(_operation) {
56
+ async executeOperation(operation) {
57
57
  var _a;
58
- await ((_a = this.layoutEngine) === null || _a === void 0 ? void 0 : _a.layout());
58
+ await ((_a = this.layoutEngine) === null || _a === void 0 ? void 0 : _a.layout(operation));
59
59
  }
60
60
  };
61
61
  exports.LayoutOperationHandler = LayoutOperationHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkF;AAClF,yCAAyD;AAEzD,uEAAyE;AACzE,+EAA6F;AAC7F,0EAAsE;AACtE,+CAA4C;AAC5C,kEAA8D;AAC9D,mDAA+C;AAE/C;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,oCAAgB;IAArD;;QAcM,kBAAa,GAAG,0BAAe,CAAC,IAAI,CAAC;IAgBlD,CAAC;IAdG,aAAa,CAAC,SAA0B;QACpC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,KAAK,wCAAgB,CAAC,MAAM,EAAE,CAAC;YACnE,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;YACpF,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,IAAI,0CAAsB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChH,CAAC;IAES,KAAK,CAAC,gBAAgB,CAAC,UAAqB;;QAClD,MAAM,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,MAAM,EAAE,CAAA,CAAC;IACtC,CAAC;CACJ,CAAA;AA9BY,wDAAsB;AAErB;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;sDAAC;AAIf;IAFT,IAAA,kBAAM,EAAC,4BAAY,CAAC;IACpB,IAAA,oBAAQ,GAAE;;4DAC2B;AAG5B;IADT,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;oEACwB;AAG3C;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0DACc;iCAZ9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA8BlC"}
1
+ {"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuE;AACvE,yCAAyD;AAEzD,uEAAyE;AACzE,+EAA6F;AAC7F,0EAAsE;AACtE,+CAA4C;AAC5C,kEAA8D;AAC9D,mDAA+C;AAE/C;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,oCAAgB;IAArD;;QAcM,kBAAa,GAAG,0BAAe,CAAC,IAAI,CAAC;IAgBlD,CAAC;IAdG,aAAa,CAAC,SAA0B;QACpC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,KAAK,wCAAgB,CAAC,MAAM,EAAE,CAAC;YACnE,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;YACpF,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,IAAI,0CAAsB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChH,CAAC;IAES,KAAK,CAAC,gBAAgB,CAAC,SAA0B;;QACvD,MAAM,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,MAAM,CAAC,SAAS,CAAC,CAAA,CAAC;IAC/C,CAAC;CACJ,CAAA;AA9BY,wDAAsB;AAErB;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;sDAAC;AAIf;IAFT,IAAA,kBAAM,EAAC,4BAAY,CAAC;IACpB,IAAA,oBAAQ,GAAE;;4DAC2B;AAG5B;IADT,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;oEACwB;AAG3C;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0DACc;iCAZ9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA8BlC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/server",
3
- "version": "2.5.0-next.125+72bdfaa",
3
+ "version": "2.5.0-next.126+01fc6b7",
4
4
  "description": "A js server framework for Eclipse GLSP",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -58,7 +58,7 @@
58
58
  "watch": "tsc -w"
59
59
  },
60
60
  "dependencies": {
61
- "@eclipse-glsp/graph": "2.5.0-next.125+72bdfaa",
61
+ "@eclipse-glsp/graph": "2.5.0-next.126+01fc6b7",
62
62
  "@eclipse-glsp/protocol": "next",
63
63
  "@types/uuid": "8.3.1",
64
64
  "commander": "^8.3.0",
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "72bdfaa5e25ed0cc386b324be5f960e56a3c440c"
81
+ "gitHead": "01fc6b74bbadfe7a4f575ef5a0dca861f1b18c99"
82
82
  }
@@ -15,7 +15,7 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import { GModelRoot } from '@eclipse-glsp/graph';
18
- import { MaybePromise } from '@eclipse-glsp/protocol';
18
+ import { LayoutOperation, MaybePromise } from '@eclipse-glsp/protocol';
19
19
 
20
20
  /**
21
21
  * A layout engine is able to compute layout information for a model.
@@ -23,9 +23,10 @@ import { MaybePromise } from '@eclipse-glsp/protocol';
23
23
  export interface LayoutEngine {
24
24
  /**
25
25
  * Computes a layout for the model state and modify the model accordingly.
26
+ * @param operation the operation that triggered this layout
26
27
  * @returns the layouted {@link GModelRoot}.
27
28
  */
28
- layout(): MaybePromise<GModelRoot>;
29
+ layout(operation?: LayoutOperation): MaybePromise<GModelRoot>;
29
30
  }
30
31
 
31
32
  export const LayoutEngine = Symbol('LayoutEngine');
@@ -13,7 +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 { LayoutOperation, MaybePromise, Operation } from '@eclipse-glsp/protocol';
16
+ import { LayoutOperation, MaybePromise } from '@eclipse-glsp/protocol';
17
17
  import { inject, injectable, optional } from 'inversify';
18
18
  import { Command } from '../../command/command';
19
19
  import { GModelRecordingCommand } from '../../command/recording-command';
@@ -56,7 +56,7 @@ export class LayoutOperationHandler extends OperationHandler {
56
56
  return new GModelRecordingCommand(this.modelState, this.serializer, () => this.executeOperation(operation));
57
57
  }
58
58
 
59
- protected async executeOperation(_operation: Operation): Promise<void> {
60
- await this.layoutEngine?.layout();
59
+ protected async executeOperation(operation: LayoutOperation): Promise<void> {
60
+ await this.layoutEngine?.layout(operation);
61
61
  }
62
62
  }