@eclipse-glsp-examples/workflow-server 1.1.0-next.3d7585d.42 → 1.1.0-next.42963d6.55
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/README.md +18 -0
- package/browser.d.ts +16 -0
- package/browser.js +18 -0
- package/lib/browser/app.d.ts +16 -0
- package/lib/browser/app.d.ts.map +1 -1
- package/lib/browser/app.js +9 -14
- package/lib/browser/app.js.map +1 -1
- package/lib/browser/index.d.ts +2 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +16 -3
- package/lib/browser/index.js.map +1 -1
- package/lib/common/graph-extension.js +1 -1
- package/lib/common/graph-extension.js.map +1 -1
- package/lib/common/handler/create-task-handler.d.ts.map +1 -1
- package/lib/common/handler/create-task-handler.js +0 -1
- package/lib/common/handler/create-task-handler.js.map +1 -1
- package/lib/common/index.d.ts +50 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +66 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/taskedit/edit-task-operation-handler.d.ts +53 -0
- package/lib/common/taskedit/edit-task-operation-handler.d.ts.map +1 -0
- package/lib/common/taskedit/edit-task-operation-handler.js +97 -0
- package/lib/common/taskedit/edit-task-operation-handler.js.map +1 -0
- package/lib/common/taskedit/task-edit-context-provider.d.ts +25 -0
- package/lib/common/taskedit/task-edit-context-provider.d.ts.map +1 -0
- package/lib/common/taskedit/task-edit-context-provider.js +77 -0
- package/lib/common/taskedit/task-edit-context-provider.js.map +1 -0
- package/lib/common/taskedit/task-edit-validator.d.ts +21 -0
- package/lib/common/taskedit/task-edit-validator.d.ts.map +1 -0
- package/lib/common/taskedit/task-edit-validator.js +60 -0
- package/lib/common/taskedit/task-edit-validator.js.map +1 -0
- package/lib/common/workflow-diagram-module.d.ts +3 -1
- package/lib/common/workflow-diagram-module.d.ts.map +1 -1
- package/lib/common/workflow-diagram-module.js +12 -0
- package/lib/common/workflow-diagram-module.js.map +1 -1
- package/lib/node/app.d.ts +16 -1
- package/lib/node/app.d.ts.map +1 -1
- package/lib/node/app.js +14 -13
- package/lib/node/app.js.map +1 -1
- package/lib/node/index.d.ts +2 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +16 -3
- package/lib/node/index.js.map +1 -1
- package/lib/node/workflow-cli-parser.d.ts +21 -0
- package/lib/node/workflow-cli-parser.d.ts.map +1 -0
- package/lib/node/workflow-cli-parser.js +26 -0
- package/lib/node/workflow-cli-parser.js.map +1 -0
- package/node.d.ts +16 -0
- package/node.js +18 -0
- package/package.json +9 -6
- package/src/browser/app.ts +15 -18
- package/src/browser/index.ts +2 -4
- package/src/common/graph-extension.ts +1 -1
- package/src/common/handler/create-task-handler.ts +0 -1
- package/src/common/index.ts +50 -0
- package/src/common/taskedit/edit-task-operation-handler.ts +118 -0
- package/src/common/taskedit/task-edit-context-provider.ts +66 -0
- package/src/common/taskedit/task-edit-validator.ts +45 -0
- package/src/common/workflow-diagram-module.ts +16 -0
- package/src/node/app.ts +19 -24
- package/src/node/index.ts +2 -4
- package/src/node/workflow-cli-parser.ts +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Eclipse GLSP - Workflow Examples
|
|
2
|
+
|
|
3
|
+
Provides the typescript implementation of the Workflow example server. This example server is used as dev example in GLSP projects.
|
|
4
|
+
|
|
5
|
+
## Workflow Diagram Example
|
|
6
|
+
|
|
7
|
+
The workflow diagram is a consistent example provided by all GLSP components.
|
|
8
|
+
The example implements a simple flow chart diagram editor with different types of nodes and edges (see screenshot below).
|
|
9
|
+
The example can be used to try out different GLSP features, as well as several available integrations with IDE platforms (Theia, VSCode, Eclipse, Standalone).
|
|
10
|
+
As the example is fully open source, you can also use it as a blueprint for a custom implementation of a GLSP diagram editor.
|
|
11
|
+
See [our project website](https://www.eclipse.org/glsp/documentation/#workflowoverview) for an overview of the workflow example and all components implementing it.
|
|
12
|
+
|
|
13
|
+
<https://user-images.githubusercontent.com/588090/154459938-849ca684-11b3-472c-8a59-98ea6cb0b4c1.mp4>
|
|
14
|
+
|
|
15
|
+
## More information
|
|
16
|
+
|
|
17
|
+
For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
|
|
18
|
+
If you have questions, please raise them in the [discussions](https://github.com/eclipse-glsp/glsp/discussions) and have a look at our [communication and support options](https://www.eclipse.org/glsp/contact/).
|
package/browser.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './lib/browser/index';
|
package/browser.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
module.exports = require('./lib/browser/index');
|
package/lib/browser/app.d.ts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import 'reflect-metadata';
|
|
1
17
|
export declare function launch(argv?: string[]): Promise<void>;
|
|
2
18
|
//# sourceMappingURL=app.d.ts.map
|
package/lib/browser/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC;AAS1B,wBAAsB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAe3D"}
|
package/lib/browser/app.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.launch = void 0;
|
|
|
16
16
|
*
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
|
+
require("reflect-metadata");
|
|
19
20
|
const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
20
21
|
const browser_1 = require("@eclipse-glsp/server/browser");
|
|
21
22
|
const inversify_1 = require("inversify");
|
|
@@ -23,20 +24,14 @@ const workflow_layout_configurator_1 = require("../common/layout/workflow-layout
|
|
|
23
24
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
24
25
|
const mock_model_storage_1 = require("./mock-model-storage");
|
|
25
26
|
async function launch(argv) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule);
|
|
34
|
-
launcher.configure(serverModule);
|
|
35
|
-
await launcher.start();
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
(logger !== null && logger !== void 0 ? logger : console).error('Error in workflow server launcher:', error);
|
|
39
|
-
}
|
|
27
|
+
const appContainer = new inversify_1.Container();
|
|
28
|
+
appContainer.load((0, browser_1.createAppModule)({ logLevel: browser_1.LogLevel.info }));
|
|
29
|
+
const launcher = appContainer.resolve(browser_1.WorkerServerLauncher);
|
|
30
|
+
const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
|
|
31
|
+
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule);
|
|
32
|
+
launcher.configure(serverModule);
|
|
33
|
+
await launcher.start({});
|
|
40
34
|
}
|
|
41
35
|
exports.launch = launch;
|
|
36
|
+
launch().catch(error => console.error('Error in workflow server launcher:', error));
|
|
42
37
|
//# sourceMappingURL=app.js.map
|
package/lib/browser/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yDAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAAoE;AACpE,0DAA+F;AAC/F,yCAAsC;AACtC,gGAA2F;AAC3F,+EAAgG;AAChG,6DAAgE;AAEzD,KAAK,UAAU,MAAM,CAAC,IAAe;IACxC,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,yBAAe,EAAC,EAAE,QAAQ,EAAE,kBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAoB,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;IAE9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,6CAAwB,CAAC,EACzD,eAAe,CAClB,CAAC;IAEF,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAEjC,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AAfD,wBAeC;AAED,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
export * from '../common/index';
|
|
17
|
+
export * from './mock-model-storage';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/lib/browser/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
/********************************************************************************
|
|
4
18
|
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
@@ -15,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
29
|
*
|
|
16
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
31
|
********************************************************************************/
|
|
18
|
-
require("
|
|
19
|
-
|
|
20
|
-
(0, app_1.launch)();
|
|
32
|
+
__exportStar(require("../common/index"), exports);
|
|
33
|
+
__exportStar(require("./mock-model-storage"), exports);
|
|
21
34
|
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,uDAAqC"}
|
|
@@ -33,7 +33,7 @@ class ActivityNodeBuilder extends server_1.GNodeBuilder {
|
|
|
33
33
|
exports.ActivityNodeBuilder = ActivityNodeBuilder;
|
|
34
34
|
class TaskNode extends server_1.GNode {
|
|
35
35
|
static builder() {
|
|
36
|
-
return new TaskNodeBuilder(TaskNode).layout('vbox').addArgs(server_1.ArgsUtil.cornerRadius(5));
|
|
36
|
+
return new TaskNodeBuilder(TaskNode).layout('vbox').addArgs(server_1.ArgsUtil.cornerRadius(5)).addCssClass('task');
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.TaskNode = TaskNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-extension.js","sourceRoot":"","sources":["../../src/common/graph-extension.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAW8B;AAC9B,oDAAgD;AAEhD,MAAa,YAAa,SAAQ,cAAK;IAGnC,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;CACJ;AAND,oCAMC;AAED,MAAa,mBAA2D,SAAQ,qBAAe;IAC3F,QAAQ,CAAC,QAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AALD,kDAKC;AAED,MAAa,QAAS,SAAQ,cAAK;IAM/B,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-extension.js","sourceRoot":"","sources":["../../src/common/graph-extension.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAW8B;AAC9B,oDAAgD;AAEhD,MAAa,YAAa,SAAQ,cAAK;IAGnC,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;CACJ;AAND,oCAMC;AAED,MAAa,mBAA2D,SAAQ,qBAAe;IAC3F,QAAQ,CAAC,QAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AALD,kDAKC;AAED,MAAa,QAAS,SAAQ,cAAK;IAM/B,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAQ,CAAC,Y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M,oBAAoB,CAAC;AAE/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,iBAAkB,SAAQ,kCAAkC;IAC9E,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,eAAe;
|
|
1
|
+
{"version":3,"file":"create-task-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAY,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,iBAAkB,SAAQ,kCAAkC;IAC9E,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,eAAe;CAQ/D"}
|
|
@@ -34,7 +34,6 @@ let CreateTaskHandler = class CreateTaskHandler extends create_workflow_node_ope
|
|
|
34
34
|
builder(point) {
|
|
35
35
|
return graph_extension_1.TaskNode.builder()
|
|
36
36
|
.position(point !== null && point !== void 0 ? point : protocol_1.Point.ORIGIN)
|
|
37
|
-
.addCssClass('task')
|
|
38
37
|
.name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(graph_extension_1.TaskNode).length)
|
|
39
38
|
.type(this.elementTypeIds[0])
|
|
40
39
|
.taskType(model_types_1.ModelTypes.toNodeType(this.elementTypeIds[0]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-task-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA+C;AAE/C,yCAAuC;AACvC,wDAA+D;AAC/D,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,iBAAiB,GAAhC,MAAe,iBAAkB,SAAQ,2EAAkC;IAC9E,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,KAAwB;QACtC,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,gBAAK,CAAC,MAAM,CAAC;aAC/B,
|
|
1
|
+
{"version":3,"file":"create-task-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA+C;AAE/C,yCAAuC;AACvC,wDAA+D;AAC/D,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,iBAAiB,GAAhC,MAAe,iBAAkB,SAAQ,2EAAkC;IAC9E,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,KAAwB;QACtC,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,gBAAK,CAAC,MAAM,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,0BAAQ,CAAC,CAAC,MAAM,CAAC;aACxF,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;aAC5B,QAAQ,CAAC,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;aACvD,QAAQ,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AAbqB,iBAAiB;IADtC,IAAA,sBAAU,GAAE;GACS,iBAAiB,CAatC;AAbqB,8CAAiB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './graph-extension';
|
|
17
|
+
export * from './handler/create-activity-node-handler';
|
|
18
|
+
export * from './handler/create-automated-task-handler';
|
|
19
|
+
export * from './handler/create-category-handler';
|
|
20
|
+
export * from './handler/create-decision-node-handler';
|
|
21
|
+
export * from './handler/create-edge-handler';
|
|
22
|
+
export * from './handler/create-fork-node-handler';
|
|
23
|
+
export * from './handler/create-fork-or-join-node-handler';
|
|
24
|
+
export * from './handler/create-join-node-handler';
|
|
25
|
+
export * from './handler/create-manual-task-handler';
|
|
26
|
+
export * from './handler/create-merge-node-handler';
|
|
27
|
+
export * from './handler/create-task-handler';
|
|
28
|
+
export * from './handler/create-weighted-edge-handler';
|
|
29
|
+
export * from './handler/create-workflow-node-operation-handler';
|
|
30
|
+
export * from './handler/grid-snapper';
|
|
31
|
+
export * from './index';
|
|
32
|
+
export * from './labeledit/workflow-label-edit-validator';
|
|
33
|
+
export * from './layout/workflow-layout-configurator';
|
|
34
|
+
export * from './marker/workflow-model-validator';
|
|
35
|
+
export * from './model/workflow-navigation-target-resolver';
|
|
36
|
+
export * from './provider/abstract-next-or-previous-navigation-target-provider';
|
|
37
|
+
export * from './provider/next-node-navigation-target-provider';
|
|
38
|
+
export * from './provider/node-documentation-navigation-target-provider';
|
|
39
|
+
export * from './provider/previous-node-navigation-target-provider';
|
|
40
|
+
export * from './provider/workflow-command-palette-action-provider';
|
|
41
|
+
export * from './provider/workflow-context-menu-item-provider';
|
|
42
|
+
export * from './taskedit/edit-task-operation-handler';
|
|
43
|
+
export * from './taskedit/task-edit-context-provider';
|
|
44
|
+
export * from './taskedit/task-edit-validator';
|
|
45
|
+
export * from './util/model-types';
|
|
46
|
+
export * from './workflow-diagram-configuration';
|
|
47
|
+
export * from './workflow-diagram-module';
|
|
48
|
+
export * from './workflow-glsp-server';
|
|
49
|
+
export * from './workflow-popup-factory';
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iEAAiE,CAAC;AAChF,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 STMicroelectronics and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require("./graph-extension"), exports);
|
|
33
|
+
__exportStar(require("./handler/create-activity-node-handler"), exports);
|
|
34
|
+
__exportStar(require("./handler/create-automated-task-handler"), exports);
|
|
35
|
+
__exportStar(require("./handler/create-category-handler"), exports);
|
|
36
|
+
__exportStar(require("./handler/create-decision-node-handler"), exports);
|
|
37
|
+
__exportStar(require("./handler/create-edge-handler"), exports);
|
|
38
|
+
__exportStar(require("./handler/create-fork-node-handler"), exports);
|
|
39
|
+
__exportStar(require("./handler/create-fork-or-join-node-handler"), exports);
|
|
40
|
+
__exportStar(require("./handler/create-join-node-handler"), exports);
|
|
41
|
+
__exportStar(require("./handler/create-manual-task-handler"), exports);
|
|
42
|
+
__exportStar(require("./handler/create-merge-node-handler"), exports);
|
|
43
|
+
__exportStar(require("./handler/create-task-handler"), exports);
|
|
44
|
+
__exportStar(require("./handler/create-weighted-edge-handler"), exports);
|
|
45
|
+
__exportStar(require("./handler/create-workflow-node-operation-handler"), exports);
|
|
46
|
+
__exportStar(require("./handler/grid-snapper"), exports);
|
|
47
|
+
__exportStar(require("./index"), exports);
|
|
48
|
+
__exportStar(require("./labeledit/workflow-label-edit-validator"), exports);
|
|
49
|
+
__exportStar(require("./layout/workflow-layout-configurator"), exports);
|
|
50
|
+
__exportStar(require("./marker/workflow-model-validator"), exports);
|
|
51
|
+
__exportStar(require("./model/workflow-navigation-target-resolver"), exports);
|
|
52
|
+
__exportStar(require("./provider/abstract-next-or-previous-navigation-target-provider"), exports);
|
|
53
|
+
__exportStar(require("./provider/next-node-navigation-target-provider"), exports);
|
|
54
|
+
__exportStar(require("./provider/node-documentation-navigation-target-provider"), exports);
|
|
55
|
+
__exportStar(require("./provider/previous-node-navigation-target-provider"), exports);
|
|
56
|
+
__exportStar(require("./provider/workflow-command-palette-action-provider"), exports);
|
|
57
|
+
__exportStar(require("./provider/workflow-context-menu-item-provider"), exports);
|
|
58
|
+
__exportStar(require("./taskedit/edit-task-operation-handler"), exports);
|
|
59
|
+
__exportStar(require("./taskedit/task-edit-context-provider"), exports);
|
|
60
|
+
__exportStar(require("./taskedit/task-edit-validator"), exports);
|
|
61
|
+
__exportStar(require("./util/model-types"), exports);
|
|
62
|
+
__exportStar(require("./workflow-diagram-configuration"), exports);
|
|
63
|
+
__exportStar(require("./workflow-diagram-module"), exports);
|
|
64
|
+
__exportStar(require("./workflow-glsp-server"), exports);
|
|
65
|
+
__exportStar(require("./workflow-popup-factory"), exports);
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,gEAA8C;AAC9C,qEAAmD;AACnD,6EAA2D;AAC3D,qEAAmD;AACnD,uEAAqD;AACrD,sEAAoD;AACpD,gEAA8C;AAC9C,yEAAuD;AACvD,mFAAiE;AACjE,yDAAuC;AACvC,0CAAwB;AACxB,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,8EAA4D;AAC5D,kGAAgF;AAChF,kFAAgE;AAChE,2FAAyE;AACzE,sFAAoE;AACpE,sFAAoE;AACpE,iFAA+D;AAC/D,yEAAuD;AACvD,wEAAsD;AACtD,iEAA+C;AAC/C,qDAAmC;AACnC,mEAAiD;AACjD,4DAA0C;AAC1C,yDAAuC;AACvC,2DAAyC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { Command, GModelOperationHandler, MaybePromise, Operation } from '@eclipse-glsp/server';
|
|
17
|
+
import { TaskNode } from '../graph-extension';
|
|
18
|
+
/**
|
|
19
|
+
* Is send from the {@link TaskEditor} to the GLSP server
|
|
20
|
+
* to update a feature from a specified task.
|
|
21
|
+
*/
|
|
22
|
+
export interface EditTaskOperation extends Operation {
|
|
23
|
+
kind: typeof EditTaskOperation.KIND;
|
|
24
|
+
/**
|
|
25
|
+
* Id of the task that should be edited
|
|
26
|
+
*/
|
|
27
|
+
taskId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The feature that is to be updated
|
|
30
|
+
*/
|
|
31
|
+
feature: 'duration' | 'taskType';
|
|
32
|
+
/**
|
|
33
|
+
* The new feature value
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
37
|
+
export declare namespace EditTaskOperation {
|
|
38
|
+
const KIND = "editTask";
|
|
39
|
+
function is(object: any): object is EditTaskOperation;
|
|
40
|
+
function create(options: {
|
|
41
|
+
taskId: string;
|
|
42
|
+
feature: 'duration' | 'taskType';
|
|
43
|
+
value: string;
|
|
44
|
+
}): EditTaskOperation;
|
|
45
|
+
}
|
|
46
|
+
export declare class EditTaskOperationHandler extends GModelOperationHandler {
|
|
47
|
+
readonly operationType = "editTask";
|
|
48
|
+
createCommand(operation: EditTaskOperation): MaybePromise<Command | undefined>;
|
|
49
|
+
protected editDuration(task: TaskNode, duration: number): void;
|
|
50
|
+
protected editTaskType(task: TaskNode, type: string): void;
|
|
51
|
+
protected createTempTask(type: 'automated' | 'manual', task: TaskNode): TaskNode;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=edit-task-operation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-task-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/taskedit/edit-task-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAU,OAAO,EAAc,sBAAsB,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEnI,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAChD,IAAI,EAAE,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAEpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,UAAU,GAAG,UAAU,CAAC;IAEjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,IAAI,aAAa,CAAC;IAE/B,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,iBAAiB,CAO3D;IAED,SAAgB,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,iBAAiB,CAMtH;CACJ;AAED,qBACa,wBAAyB,SAAQ,sBAAsB;IAChE,QAAQ,CAAC,aAAa,cAA0B;IAEhD,aAAa,CAAC,SAAS,EAAE,iBAAiB,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IAoB9E,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI9D,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAgB1D,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ;CASnF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.EditTaskOperationHandler = exports.EditTaskOperation = void 0;
|
|
25
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
const graph_extension_1 = require("../graph-extension");
|
|
28
|
+
const model_types_1 = require("../util/model-types");
|
|
29
|
+
var EditTaskOperation;
|
|
30
|
+
(function (EditTaskOperation) {
|
|
31
|
+
EditTaskOperation.KIND = 'editTask';
|
|
32
|
+
function is(object) {
|
|
33
|
+
return (server_1.Action.hasKind(object, EditTaskOperation.KIND) &&
|
|
34
|
+
(0, server_1.hasStringProp)(object, 'taskId') &&
|
|
35
|
+
(0, server_1.hasStringProp)(object, 'feature') &&
|
|
36
|
+
(0, server_1.hasStringProp)(object, 'value'));
|
|
37
|
+
}
|
|
38
|
+
EditTaskOperation.is = is;
|
|
39
|
+
function create(options) {
|
|
40
|
+
return Object.assign({ kind: EditTaskOperation.KIND, isOperation: true }, options);
|
|
41
|
+
}
|
|
42
|
+
EditTaskOperation.create = create;
|
|
43
|
+
})(EditTaskOperation = exports.EditTaskOperation || (exports.EditTaskOperation = {}));
|
|
44
|
+
let EditTaskOperationHandler = class EditTaskOperationHandler extends server_1.GModelOperationHandler {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
this.operationType = EditTaskOperation.KIND;
|
|
48
|
+
}
|
|
49
|
+
createCommand(operation) {
|
|
50
|
+
const task = (0, server_1.getOrThrow)(this.modelState.index.findByClass(operation.taskId, graph_extension_1.TaskNode), `Cannot find task with id '${operation.taskId}'`);
|
|
51
|
+
switch (operation.feature) {
|
|
52
|
+
case 'duration': {
|
|
53
|
+
const duration = Number.parseInt(operation.value, 10);
|
|
54
|
+
return duration !== task.duration //
|
|
55
|
+
? this.commandOf(() => this.editDuration(task, duration))
|
|
56
|
+
: undefined;
|
|
57
|
+
}
|
|
58
|
+
case 'taskType': {
|
|
59
|
+
return task.taskType !== operation.value //
|
|
60
|
+
? this.commandOf(() => this.editTaskType(task, operation.value))
|
|
61
|
+
: undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
editDuration(task, duration) {
|
|
66
|
+
task.duration = duration;
|
|
67
|
+
}
|
|
68
|
+
editTaskType(task, type) {
|
|
69
|
+
task.taskType = type;
|
|
70
|
+
if (type === 'manual' || type === 'automated') {
|
|
71
|
+
const temp = this.createTempTask(type, task);
|
|
72
|
+
const toAssign = {
|
|
73
|
+
taskType: temp.taskType,
|
|
74
|
+
type: temp.type,
|
|
75
|
+
children: temp.children,
|
|
76
|
+
cssClasses: temp.cssClasses
|
|
77
|
+
};
|
|
78
|
+
Object.assign(task, toAssign);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
throw new Error(`Could not edit task '${task.id}'. Invalid type: ${type}`);
|
|
82
|
+
}
|
|
83
|
+
createTempTask(type, task) {
|
|
84
|
+
return graph_extension_1.TaskNode.builder() //
|
|
85
|
+
.type(type === 'automated' ? model_types_1.ModelTypes.AUTOMATED_TASK : model_types_1.ModelTypes.MANUAL_TASK)
|
|
86
|
+
.taskType(type)
|
|
87
|
+
.name(task.name)
|
|
88
|
+
.addCssClass(type)
|
|
89
|
+
.children()
|
|
90
|
+
.build();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
EditTaskOperationHandler = __decorate([
|
|
94
|
+
(0, inversify_1.injectable)()
|
|
95
|
+
], EditTaskOperationHandler);
|
|
96
|
+
exports.EditTaskOperationHandler = EditTaskOperationHandler;
|
|
97
|
+
//# sourceMappingURL=edit-task-operation-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-task-operation-handler.js","sourceRoot":"","sources":["../../../src/common/taskedit/edit-task-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,iDAAmI;AACnI,yCAAuC;AACvC,wDAA8C;AAC9C,qDAAiD;AAwBjD,IAAiB,iBAAiB,CAmBjC;AAnBD,WAAiB,iBAAiB;IACjB,sBAAI,GAAG,UAAU,CAAC;IAE/B,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,CACH,eAAM,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAA,IAAI,CAAC;YAC5B,IAAA,sBAAa,EAAC,MAAM,EAAE,QAAQ,CAAC;YAC/B,IAAA,sBAAa,EAAC,MAAM,EAAE,SAAS,CAAC;YAChC,IAAA,sBAAa,EAAC,MAAM,EAAE,OAAO,CAAC,CACjC,CAAC;IACN,CAAC;IAPe,oBAAE,KAOjB,CAAA;IAED,SAAgB,MAAM,CAAC,OAA4E;QAC/F,uBACI,IAAI,EAAE,kBAAA,IAAI,EACV,WAAW,EAAE,IAAI,IACd,OAAO,EACZ;IACN,CAAC;IANe,wBAAM,SAMrB,CAAA;AACL,CAAC,EAnBgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAmBjC;AAGM,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,+BAAsB;IAA7D;;QACM,kBAAa,GAAG,iBAAiB,CAAC,IAAI,CAAC;IAmDpD,CAAC;IAjDG,aAAa,CAAC,SAA4B;QACtC,MAAM,IAAI,GAAG,IAAA,mBAAU,EACnB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,0BAAQ,CAAC,EAC7D,6BAA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AAE,QAAQ,CAAC,CAAC;YAC9B,OAAO;SACV;QACD,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,EAAE,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAES,cAAc,CAAC,IAA4B,EAAE,IAAc;QACjE,OAAO,0BAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;aACvB,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,wBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,wBAAU,CAAC,WAAW,CAAC;aAC/E,QAAQ,CAAC,IAAI,CAAC;aACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aACf,WAAW,CAAC,IAAI,CAAC;aACjB,QAAQ,EAAE;aACV,KAAK,EAAE,CAAC;IACjB,CAAC;CACJ,CAAA;AApDY,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CAoDpC;AApDY,4DAAwB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { ContextActionsProvider, EditorContext, LabeledAction, MaybePromise, ModelState } from '@eclipse-glsp/server';
|
|
17
|
+
export declare class TaskEditContextActionProvider implements ContextActionsProvider {
|
|
18
|
+
static readonly DURATION_PREFIX = "duration:";
|
|
19
|
+
static readonly TYPE_PREFIX = "type:";
|
|
20
|
+
static readonly TASK_PREFIX = "task:";
|
|
21
|
+
readonly contextId = "task-editor";
|
|
22
|
+
protected modelState: ModelState;
|
|
23
|
+
getActions(editorContext: EditorContext): MaybePromise<LabeledAction[]>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=task-edit-context-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-edit-context-provider.d.ts","sourceRoot":"","sources":["../../../src/common/taskedit/task-edit-context-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAe,MAAM,sBAAsB,CAAC;AAKnI,qBACa,6BAA8B,YAAW,sBAAsB;IACxE,MAAM,CAAC,QAAQ,CAAC,eAAe,eAAe;IAC9C,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAW;IACtC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAW;IAEtC,QAAQ,CAAC,SAAS,iBAAiB;IAGnC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC;CA8B1E"}
|