@eclipse-glsp/vscode-integration-webview 1.1.0-next.e5a109d.70 → 1.1.0-next.e982187.71
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/default-modules.d.ts +1 -1
- package/lib/default-modules.d.ts.map +1 -1
- package/lib/default-modules.js +8 -1
- package/lib/default-modules.js.map +1 -1
- package/lib/features/default/default-module.d.ts.map +1 -1
- package/lib/features/default/default-module.js +1 -0
- package/lib/features/default/default-module.js.map +1 -1
- package/lib/features/default/extension-action-handler.d.ts +3 -3
- package/lib/features/default/extension-action-handler.js +3 -3
- package/lib/features/notification/notification-module.d.ts +18 -0
- package/lib/features/notification/notification-module.d.ts.map +1 -0
- package/lib/features/notification/notification-module.js +27 -0
- package/lib/features/notification/notification-module.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/src/default-modules.ts +8 -1
- package/src/features/default/default-module.ts +3 -2
- package/src/features/default/extension-action-handler.ts +3 -3
- package/src/features/notification/notification-module.ts +25 -0
- package/src/index.ts +1 -0
package/lib/default-modules.d.ts
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { ModuleConfiguration } from '@eclipse-glsp/client';
|
|
17
|
-
export declare const VSCODE_DEFAULT_MODULES: readonly [import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule];
|
|
17
|
+
export declare const VSCODE_DEFAULT_MODULES: readonly [import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule, import("@eclipse-glsp/client").FeatureModule];
|
|
18
18
|
export declare const VSCODE_DEFAULT_MODULE_CONFIG: ModuleConfiguration;
|
|
19
19
|
//# sourceMappingURL=default-modules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-modules.d.ts","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"default-modules.d.ts","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAO3D,eAAO,MAAM,sBAAsB,iPAMzB,CAAC;AAEX,eAAO,MAAM,4BAA4B,EAAE,mBAE1C,CAAC"}
|
package/lib/default-modules.js
CHANGED
|
@@ -20,7 +20,14 @@ const copy_paste_module_1 = require("./features/copyPaste/copy-paste-module");
|
|
|
20
20
|
const default_module_1 = require("./features/default/default-module");
|
|
21
21
|
const export_module_1 = require("./features/export/export-module");
|
|
22
22
|
const navigation_module_1 = require("./features/navigation/navigation-module");
|
|
23
|
-
|
|
23
|
+
const notification_module_1 = require("./features/notification/notification-module");
|
|
24
|
+
exports.VSCODE_DEFAULT_MODULES = [
|
|
25
|
+
default_module_1.vscodeDefaultModule,
|
|
26
|
+
copy_paste_module_1.vscodeCopyPasteModule,
|
|
27
|
+
export_module_1.vscodeExportModule,
|
|
28
|
+
navigation_module_1.vscodeNavigationModule,
|
|
29
|
+
notification_module_1.vscodeNotificationModule
|
|
30
|
+
];
|
|
24
31
|
exports.VSCODE_DEFAULT_MODULE_CONFIG = {
|
|
25
32
|
add: [...exports.VSCODE_DEFAULT_MODULES]
|
|
26
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-modules.js","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,8EAA+E;AAC/E,sEAAwE;AACxE,mEAAqE;AACrE,+EAAiF;
|
|
1
|
+
{"version":3,"file":"default-modules.js","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,8EAA+E;AAC/E,sEAAwE;AACxE,mEAAqE;AACrE,+EAAiF;AACjF,qFAAuF;AAE1E,QAAA,sBAAsB,GAAG;IAClC,oCAAmB;IACnB,yCAAqB;IACrB,kCAAkB;IAClB,0CAAsB;IACtB,8CAAwB;CAClB,CAAC;AAEE,QAAA,4BAA4B,GAAwB;IAC7D,GAAG,EAAE,CAAC,GAAG,8BAAsB,CAAC;CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-module.d.ts","sourceRoot":"","sources":["../../../src/features/default/default-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"default-module.d.ts","sourceRoot":"","sources":["../../../src/features/default/default-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAsE,MAAM,sBAAsB,CAAC;AAKzH,eAAO,MAAM,mBAAmB,eAU/B,CAAC"}
|
|
@@ -26,5 +26,6 @@ exports.vscodeDefaultModule = new client_1.FeatureModule((bind, _unbind, _isBoun
|
|
|
26
26
|
bind(vscode_glsp_modelsource_1.VsCodeGLSPModelSource).toSelf().inSingletonScope();
|
|
27
27
|
rebind(client_1.GLSPModelSource).toService(vscode_glsp_modelsource_1.VsCodeGLSPModelSource);
|
|
28
28
|
(0, client_1.bindAsService)(bind, client_1.TYPES.IActionHandlerInitializer, extension_action_handler_1.HostExtensionActionHandler);
|
|
29
|
+
bind(extension_action_handler_1.ExtensionActionKind).toConstantValue(client_1.SelectAction.KIND);
|
|
29
30
|
}, { requires: client_1.defaultModule });
|
|
30
31
|
//# sourceMappingURL=default-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-module.js","sourceRoot":"","sources":["../../../src/features/default/default-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,
|
|
1
|
+
{"version":3,"file":"default-module.js","sourceRoot":"","sources":["../../../src/features/default/default-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,iDAAyH;AACzH,mEAAwF;AACxF,yEAA6F;AAC7F,uEAAkE;AAErD,QAAA,mBAAmB,GAAG,IAAI,sBAAa,CAChD,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;IAChC,IAAI,CAAC,uCAAiB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACpD,IAAI,CAAC,8CAAwB,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAoB,uCAAiB,CAAC,CAAC,CAAC;IACvH,IAAI,CAAC,+CAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,MAAM,CAAC,wBAAe,CAAC,CAAC,SAAS,CAAC,+CAAqB,CAAC,CAAC;IACzD,IAAA,sBAAa,EAAC,IAAI,EAAE,cAAK,CAAC,yBAAyB,EAAE,qDAA0B,CAAC,CAAC;IACjF,IAAI,CAAC,8CAAmB,CAAC,CAAC,eAAe,CAAC,qBAAY,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC,EACD,EAAE,QAAQ,EAAE,sBAAa,EAAE,CAC9B,CAAC"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, ActionHandlerRegistry, GLSPClient, IActionHandler, IActionHandlerInitializer, ICommand, IDiagramOptions } from '@eclipse-glsp/client';
|
|
17
17
|
/**
|
|
18
|
-
* Service identifier to define action kinds that should be delegated to the vscode extension
|
|
18
|
+
* Service identifier to define action kinds that should be delegated to the vscode extension (when locally dispatched)
|
|
19
19
|
*
|
|
20
20
|
* Usage:
|
|
21
21
|
* ```ts
|
|
@@ -24,9 +24,9 @@ import { Action, ActionHandlerRegistry, GLSPClient, IActionHandler, IActionHandl
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const ExtensionActionKind: unique symbol;
|
|
26
26
|
/**
|
|
27
|
-
* Delegates actions that should be handled inside of the
|
|
27
|
+
* Delegates actions that should be handled inside of the host extension instead
|
|
28
28
|
* of the webview. This enables the implementation of action handlers that require access
|
|
29
|
-
* to the vscode API
|
|
29
|
+
* to the vscode API.
|
|
30
30
|
*/
|
|
31
31
|
export declare class HostExtensionActionHandler implements IActionHandler, IActionHandlerInitializer {
|
|
32
32
|
protected actionKinds: string[];
|
|
@@ -28,7 +28,7 @@ exports.HostExtensionActionHandler = exports.ExtensionActionKind = void 0;
|
|
|
28
28
|
const client_1 = require("@eclipse-glsp/client");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
/**
|
|
31
|
-
* Service identifier to define action kinds that should be delegated to the vscode extension
|
|
31
|
+
* Service identifier to define action kinds that should be delegated to the vscode extension (when locally dispatched)
|
|
32
32
|
*
|
|
33
33
|
* Usage:
|
|
34
34
|
* ```ts
|
|
@@ -37,9 +37,9 @@ const inversify_1 = require("inversify");
|
|
|
37
37
|
*/
|
|
38
38
|
exports.ExtensionActionKind = Symbol('ExtensionActionKind');
|
|
39
39
|
/**
|
|
40
|
-
* Delegates actions that should be handled inside of the
|
|
40
|
+
* Delegates actions that should be handled inside of the host extension instead
|
|
41
41
|
* of the webview. This enables the implementation of action handlers that require access
|
|
42
|
-
* to the vscode API
|
|
42
|
+
* to the vscode API.
|
|
43
43
|
*/
|
|
44
44
|
let HostExtensionActionHandler = class HostExtensionActionHandler {
|
|
45
45
|
constructor() {
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { FeatureModule } from '@eclipse-glsp/client';
|
|
17
|
+
export declare const vscodeNotificationModule: FeatureModule;
|
|
18
|
+
//# sourceMappingURL=notification-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-module.d.ts","sourceRoot":"","sources":["../../../src/features/notification/notification-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAqB,aAAa,EAA4D,MAAM,sBAAsB,CAAC;AAGlI,eAAO,MAAM,wBAAwB,eAKnC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.vscodeNotificationModule = void 0;
|
|
19
|
+
const client_1 = require("@eclipse-glsp/client");
|
|
20
|
+
const extension_action_handler_1 = require("../default/extension-action-handler");
|
|
21
|
+
exports.vscodeNotificationModule = new client_1.FeatureModule(bind => {
|
|
22
|
+
bind(extension_action_handler_1.ExtensionActionKind).toConstantValue(client_1.MessageAction.KIND);
|
|
23
|
+
bind(extension_action_handler_1.ExtensionActionKind).toConstantValue(client_1.StartProgressAction.KIND);
|
|
24
|
+
bind(extension_action_handler_1.ExtensionActionKind).toConstantValue(client_1.EndProgressAction.KIND);
|
|
25
|
+
bind(extension_action_handler_1.ExtensionActionKind).toConstantValue(client_1.UpdateProgressAction.KIND);
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=notification-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-module.js","sourceRoot":"","sources":["../../../src/features/notification/notification-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,iDAAkI;AAClI,kFAA0E;AAE7D,QAAA,wBAAwB,GAAG,IAAI,sBAAa,CAAC,IAAI,CAAC,EAAE;IAC7D,IAAI,CAAC,8CAAmB,CAAC,CAAC,eAAe,CAAC,sBAAa,CAAC,IAAI,CAAC,CAAC;IAC9D,IAAI,CAAC,8CAAmB,CAAC,CAAC,eAAe,CAAC,4BAAmB,CAAC,IAAI,CAAC,CAAC;IACpE,IAAI,CAAC,8CAAmB,CAAC,CAAC,eAAe,CAAC,0BAAiB,CAAC,IAAI,CAAC,CAAC;IAClE,IAAI,CAAC,8CAAmB,CAAC,CAAC,eAAe,CAAC,6BAAoB,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './features/default/default-module';
|
|
|
21
21
|
export * from './features/default/vscode-glsp-modelsource';
|
|
22
22
|
export * from './features/export/export-module';
|
|
23
23
|
export * from './features/navigation/navigation-module';
|
|
24
|
+
export * from './features/notification/notification-module';
|
|
24
25
|
export * from './glsp-diagram-widget';
|
|
25
26
|
export * from './glsp-starter';
|
|
26
27
|
export * from './webview-glsp-client';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./features/default/default-module"), exports);
|
|
|
37
37
|
__exportStar(require("./features/default/vscode-glsp-modelsource"), exports);
|
|
38
38
|
__exportStar(require("./features/export/export-module"), exports);
|
|
39
39
|
__exportStar(require("./features/navigation/navigation-module"), exports);
|
|
40
|
+
__exportStar(require("./features/notification/notification-module"), exports);
|
|
40
41
|
__exportStar(require("./glsp-diagram-widget"), exports);
|
|
41
42
|
__exportStar(require("./glsp-starter"), exports);
|
|
42
43
|
__exportStar(require("./webview-glsp-client"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,uDAAqC;AACrC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,6EAA2D;AAC3D,kEAAgD;AAChD,0EAAwD;AACxD,wDAAsC;AACtC,iDAA+B;AAC/B,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,uDAAqC;AACrC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,6EAA2D;AAC3D,kEAAgD;AAChD,0EAAwD;AACxD,8EAA4D;AAC5D,wDAAsC;AACtC,iDAA+B;AAC/B,wDAAsC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/vscode-integration-webview",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.e982187.71+e982187",
|
|
4
4
|
"description": "Integration of a GLSP diagram in a VS Code extensions (WebView part)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vscode",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e982187656d00f61b0a1742f474927c0752d64eb"
|
|
55
55
|
}
|
package/src/default-modules.ts
CHANGED
|
@@ -19,8 +19,15 @@ import { vscodeCopyPasteModule } from './features/copyPaste/copy-paste-module';
|
|
|
19
19
|
import { vscodeDefaultModule } from './features/default/default-module';
|
|
20
20
|
import { vscodeExportModule } from './features/export/export-module';
|
|
21
21
|
import { vscodeNavigationModule } from './features/navigation/navigation-module';
|
|
22
|
+
import { vscodeNotificationModule } from './features/notification/notification-module';
|
|
22
23
|
|
|
23
|
-
export const VSCODE_DEFAULT_MODULES = [
|
|
24
|
+
export const VSCODE_DEFAULT_MODULES = [
|
|
25
|
+
vscodeDefaultModule,
|
|
26
|
+
vscodeCopyPasteModule,
|
|
27
|
+
vscodeExportModule,
|
|
28
|
+
vscodeNavigationModule,
|
|
29
|
+
vscodeNotificationModule
|
|
30
|
+
] as const;
|
|
24
31
|
|
|
25
32
|
export const VSCODE_DEFAULT_MODULE_CONFIG: ModuleConfiguration = {
|
|
26
33
|
add: [...VSCODE_DEFAULT_MODULES]
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { FeatureModule, GLSPModelSource, TYPES, bindAsService, defaultModule } from '@eclipse-glsp/client';
|
|
17
|
+
import { FeatureModule, GLSPModelSource, SelectAction, TYPES, bindAsService, defaultModule } from '@eclipse-glsp/client';
|
|
18
18
|
import { GLSPDiagramWidget, GLSPDiagramWidgetFactory } from '../../glsp-diagram-widget';
|
|
19
|
-
import { HostExtensionActionHandler } from './extension-action-handler';
|
|
19
|
+
import { ExtensionActionKind, HostExtensionActionHandler } from './extension-action-handler';
|
|
20
20
|
import { VsCodeGLSPModelSource } from './vscode-glsp-modelsource';
|
|
21
21
|
|
|
22
22
|
export const vscodeDefaultModule = new FeatureModule(
|
|
@@ -26,6 +26,7 @@ export const vscodeDefaultModule = new FeatureModule(
|
|
|
26
26
|
bind(VsCodeGLSPModelSource).toSelf().inSingletonScope();
|
|
27
27
|
rebind(GLSPModelSource).toService(VsCodeGLSPModelSource);
|
|
28
28
|
bindAsService(bind, TYPES.IActionHandlerInitializer, HostExtensionActionHandler);
|
|
29
|
+
bind(ExtensionActionKind).toConstantValue(SelectAction.KIND);
|
|
29
30
|
},
|
|
30
31
|
{ requires: defaultModule }
|
|
31
32
|
);
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import { inject, injectable, multiInject, optional, postConstruct } from 'inversify';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Service identifier to define action kinds that should be delegated to the vscode extension
|
|
29
|
+
* Service identifier to define action kinds that should be delegated to the vscode extension (when locally dispatched)
|
|
30
30
|
*
|
|
31
31
|
* Usage:
|
|
32
32
|
* ```ts
|
|
@@ -36,9 +36,9 @@ import { inject, injectable, multiInject, optional, postConstruct } from 'invers
|
|
|
36
36
|
export const ExtensionActionKind = Symbol('ExtensionActionKind');
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Delegates actions that should be handled inside of the
|
|
39
|
+
* Delegates actions that should be handled inside of the host extension instead
|
|
40
40
|
* of the webview. This enables the implementation of action handlers that require access
|
|
41
|
-
* to the vscode API
|
|
41
|
+
* to the vscode API.
|
|
42
42
|
*/
|
|
43
43
|
@injectable()
|
|
44
44
|
export class HostExtensionActionHandler implements IActionHandler, IActionHandlerInitializer {
|
|
@@ -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
|
+
|
|
17
|
+
import { EndProgressAction, FeatureModule, MessageAction, StartProgressAction, UpdateProgressAction } from '@eclipse-glsp/client';
|
|
18
|
+
import { ExtensionActionKind } from '../default/extension-action-handler';
|
|
19
|
+
|
|
20
|
+
export const vscodeNotificationModule = new FeatureModule(bind => {
|
|
21
|
+
bind(ExtensionActionKind).toConstantValue(MessageAction.KIND);
|
|
22
|
+
bind(ExtensionActionKind).toConstantValue(StartProgressAction.KIND);
|
|
23
|
+
bind(ExtensionActionKind).toConstantValue(EndProgressAction.KIND);
|
|
24
|
+
bind(ExtensionActionKind).toConstantValue(UpdateProgressAction.KIND);
|
|
25
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './features/default/default-module';
|
|
|
22
22
|
export * from './features/default/vscode-glsp-modelsource';
|
|
23
23
|
export * from './features/export/export-module';
|
|
24
24
|
export * from './features/navigation/navigation-module';
|
|
25
|
+
export * from './features/notification/notification-module';
|
|
25
26
|
export * from './glsp-diagram-widget';
|
|
26
27
|
export * from './glsp-starter';
|
|
27
28
|
export * from './webview-glsp-client';
|