From 313ecd3a1e6555f6dd18bef749ec2132f8b3636e Mon Sep 17 00:00:00 2001 From: Lukas Lieb Date: Mon, 25 Nov 2024 12:14:40 +0100 Subject: [PATCH] XIVY-14935 Update glsp to v2.3.0-next.390 - Align ActionDispatcher API (GLSP-1416) --- integration/eclipse/package.json | 4 +- integration/eclipse/src/startup.ts | 8 +-- integration/standalone/package.json | 2 +- integration/standalone/src/app.ts | 5 +- integration/standalone/src/startup.ts | 8 +-- integration/viewer/package.json | 2 +- integration/viewer/src/app.ts | 5 +- integration/viewer/src/startup.ts | 8 +-- package-lock.json | 57 +++++++++++-------- packages/editor/package.json | 2 +- packages/editor/src/jump/action.ts | 6 +- packages/editor/src/tools/di.config.ts | 2 +- .../src/tools/ivy-change-bounds-tool.ts | 3 +- .../quick-action/color/action-handler.ts | 6 +- .../src/ui-tools/quick-action/color/action.ts | 4 +- .../src/ui-tools/quick-action/info/action.ts | 6 +- .../quick-action/types/action-handler.ts | 6 +- .../src/ui-tools/quick-action/types/action.ts | 4 +- .../ui-tools/tool-bar/node/action-handler.ts | 6 +- .../editor/src/ui-tools/tool-bar/tool-bar.ts | 6 +- .../src/ui-tools/viewport/viewport-bar.ts | 6 +- packages/inscription/package.json | 2 +- .../src/inscription/inscription-ui.tsx | 7 ++- packages/protocol/package.json | 2 +- 24 files changed, 90 insertions(+), 77 deletions(-) diff --git a/integration/eclipse/package.json b/integration/eclipse/package.json index e2564922..bbdde5c5 100644 --- a/integration/eclipse/package.json +++ b/integration/eclipse/package.json @@ -13,9 +13,9 @@ "@axonivy/process-editor": "~12.0.1-next", "@axonivy/process-editor-inscription": "~12.0.1-next", "@axonivy/process-editor-inscription-view": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "@eclipse-glsp/ide": "2.3.0-next.134", - "@eclipse-glsp/protocol": "2.3.0-next.381" + "@eclipse-glsp/protocol": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", diff --git a/integration/eclipse/src/startup.ts b/integration/eclipse/src/startup.ts index 71d8ff98..75419182 100644 --- a/integration/eclipse/src/startup.ts +++ b/integration/eclipse/src/startup.ts @@ -2,8 +2,8 @@ import type { ToolBar } from '@axonivy/process-editor'; import { IVY_TYPES } from '@axonivy/process-editor'; import { EnableInscriptionAction } from '@axonivy/process-editor-inscription'; import { EnableViewportAction, SwitchThemeAction, UpdatePaletteItems } from '@axonivy/process-editor-protocol'; -import type { IDiagramStartup} from '@eclipse-glsp/client'; -import { EnableToolPaletteAction, GLSPActionDispatcher, ShowGridAction, TYPES } from '@eclipse-glsp/client'; +import type { IActionDispatcher, IDiagramStartup } from '@eclipse-glsp/client'; +import { EnableToolPaletteAction, ShowGridAction, TYPES } from '@eclipse-glsp/client'; import { ContainerModule, inject, injectable } from 'inversify'; import type { IvyDiagramOptions } from './di.config'; @@ -11,8 +11,8 @@ import './index.css'; @injectable() export class EclipseDiagramStartup implements IDiagramStartup { - @inject(GLSPActionDispatcher) - protected actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) + protected actionDispatcher: IActionDispatcher; @inject(IVY_TYPES.ToolBar) protected toolBar: ToolBar; diff --git a/integration/standalone/package.json b/integration/standalone/package.json index d5d21184..aab2249a 100644 --- a/integration/standalone/package.json +++ b/integration/standalone/package.json @@ -14,7 +14,7 @@ "@axonivy/process-editor-inscription": "~12.0.1-next", "@axonivy/process-editor-inscription-view": "~12.0.1-next", "@axonivy/ui-components": "~12.0.1-next.384", - "@eclipse-glsp/client": "2.3.0-next.381" + "@eclipse-glsp/client": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", diff --git a/integration/standalone/src/app.ts b/integration/standalone/src/app.ts index b7d08d3c..b6909c2d 100644 --- a/integration/standalone/src/app.ts +++ b/integration/standalone/src/app.ts @@ -1,7 +1,8 @@ import { MonacoEditorUtil } from '@axonivy/process-editor-inscription-view'; import { IvyBaseJsonrpcGLSPClient, SwitchThemeActionHandler } from '@axonivy/process-editor'; import type { ThemeMode } from '@axonivy/process-editor-protocol'; -import { DiagramLoader, EditMode, GLSPActionDispatcher, GLSPWebSocketProvider, MessageAction, StatusAction } from '@eclipse-glsp/client'; +import type { IActionDispatcher } from '@eclipse-glsp/client'; +import { DiagramLoader, EditMode, GLSPWebSocketProvider, MessageAction, StatusAction, TYPES } from '@eclipse-glsp/client'; import { ApplicationIdProvider, GLSPClient } from '@eclipse-glsp/protocol'; import type { Container } from 'inversify'; import type { MessageConnection } from 'vscode-jsonrpc'; @@ -63,7 +64,7 @@ async function initialize(connectionProvider: MessageConnection, isReconnecting } }); - const actionDispatcher = container.get(GLSPActionDispatcher); + const actionDispatcher = container.get(TYPES.IActionDispatcher); if (isReconnecting) { const message = `Connection to the ${id} glsp server got closed. Connection was successfully re-established.`; const timeout = 5000; diff --git a/integration/standalone/src/startup.ts b/integration/standalone/src/startup.ts index 607ba01b..6dec4e7e 100644 --- a/integration/standalone/src/startup.ts +++ b/integration/standalone/src/startup.ts @@ -1,15 +1,15 @@ import { EnableInscriptionAction } from '@axonivy/process-editor-inscription'; import { EnableViewportAction, SwitchThemeAction, UpdatePaletteItems } from '@axonivy/process-editor-protocol'; -import type { IDiagramStartup } from '@eclipse-glsp/client'; -import { EnableToolPaletteAction, GLSPActionDispatcher, NavigationTarget, SelectAction, TYPES } from '@eclipse-glsp/client'; +import type { IActionDispatcher, IDiagramStartup } from '@eclipse-glsp/client'; +import { EnableToolPaletteAction, NavigationTarget, SelectAction, TYPES } from '@eclipse-glsp/client'; import { ContainerModule, inject, injectable } from 'inversify'; import type { IvyDiagramOptions } from './di.config'; import './index.css'; @injectable() export class StandaloneDiagramStartup implements IDiagramStartup { - @inject(GLSPActionDispatcher) - protected actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) + protected actionDispatcher: IActionDispatcher; @inject(TYPES.IDiagramOptions) protected options: IvyDiagramOptions; diff --git a/integration/viewer/package.json b/integration/viewer/package.json index c8239898..4b6157a4 100644 --- a/integration/viewer/package.json +++ b/integration/viewer/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@axonivy/process-editor": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381" + "@eclipse-glsp/client": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", diff --git a/integration/viewer/src/app.ts b/integration/viewer/src/app.ts index e47132ba..ed174130 100644 --- a/integration/viewer/src/app.ts +++ b/integration/viewer/src/app.ts @@ -1,6 +1,7 @@ import { IvyBaseJsonrpcGLSPClient, SwitchThemeActionHandler } from '@axonivy/process-editor'; import type { ThemeMode } from '@axonivy/process-editor-protocol'; -import { DiagramLoader, EditMode, GLSPActionDispatcher, GLSPWebSocketProvider, MessageAction, StatusAction } from '@eclipse-glsp/client'; +import type { IActionDispatcher } from '@eclipse-glsp/client'; +import { DiagramLoader, EditMode, GLSPWebSocketProvider, MessageAction, StatusAction, TYPES } from '@eclipse-glsp/client'; import { ApplicationIdProvider, GLSPClient } from '@eclipse-glsp/protocol'; import type { Container } from 'inversify'; import type { MessageConnection } from 'vscode-jsonrpc'; @@ -59,7 +60,7 @@ async function initialize(connectionProvider: MessageConnection, isReconnecting } }); - const actionDispatcher = container.get(GLSPActionDispatcher); + const actionDispatcher = container.get(TYPES.IActionDispatcher); if (isReconnecting) { const message = `Connection to the ${id} glsp server got closed. Connection was successfully re-established.`; const timeout = 5000; diff --git a/integration/viewer/src/startup.ts b/integration/viewer/src/startup.ts index db529995..f9c918ae 100644 --- a/integration/viewer/src/startup.ts +++ b/integration/viewer/src/startup.ts @@ -1,6 +1,6 @@ import { EnableViewportAction, MoveIntoViewportAction, SetViewportZoomAction, SwitchThemeAction } from '@axonivy/process-editor-protocol'; -import type { Action, IDiagramStartup } from '@eclipse-glsp/client'; -import { CenterAction, GLSPActionDispatcher, NavigationTarget, SelectAction, TYPES } from '@eclipse-glsp/client'; +import type { Action, IActionDispatcher, IDiagramStartup } from '@eclipse-glsp/client'; +import { CenterAction, NavigationTarget, SelectAction, TYPES } from '@eclipse-glsp/client'; import type { interfaces } from 'inversify'; import { ContainerModule, inject, injectable } from 'inversify'; import type { IvyDiagramOptions } from './di.config'; @@ -10,8 +10,8 @@ const ContainerSymbol = Symbol('ContainerSymbol'); @injectable() export class ViewerDiagramStartup implements IDiagramStartup { - @inject(GLSPActionDispatcher) - protected actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) + protected actionDispatcher: IActionDispatcher; @inject(TYPES.IDiagramOptions) protected options: IvyDiagramOptions; diff --git a/package-lock.json b/package-lock.json index 28c47867..87c3a76f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,9 +44,9 @@ "@axonivy/process-editor": "~12.0.1-next", "@axonivy/process-editor-inscription": "~12.0.1-next", "@axonivy/process-editor-inscription-view": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "@eclipse-glsp/ide": "2.3.0-next.134", - "@eclipse-glsp/protocol": "2.3.0-next.381" + "@eclipse-glsp/protocol": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", @@ -83,7 +83,7 @@ "@axonivy/process-editor-inscription": "~12.0.1-next", "@axonivy/process-editor-inscription-view": "~12.0.1-next", "@axonivy/ui-components": "~12.0.1-next.384", - "@eclipse-glsp/client": "2.3.0-next.381" + "@eclipse-glsp/client": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", @@ -98,7 +98,7 @@ "version": "12.0.1-next", "dependencies": { "@axonivy/process-editor": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381" + "@eclipse-glsp/client": "2.3.0-next.390" }, "devDependencies": { "@vscode/codicons": "^0.0.25", @@ -608,11 +608,12 @@ } }, "node_modules/@eclipse-glsp/client": { - "version": "2.3.0-next.381", - "resolved": "https://registry.npmjs.org/@eclipse-glsp/client/-/client-2.3.0-next.381.tgz", - "integrity": "sha512-9GmdqbGpN9vxy3esuj6gCht+LVzsCsEO6MwWKd2NfvLaeDxjxg3EmbBt22i9EVmGsxUgewZhgVzDVvtJYpKTwQ==", + "version": "2.3.0-next.390", + "resolved": "https://registry.npmjs.org/@eclipse-glsp/client/-/client-2.3.0-next.390.tgz", + "integrity": "sha512-EMfyLTAr6olxCxmwfI8uF5M2I9IAqUoFiV9eqwUSQNNb48xZH14X/yuOohXDcT79P5Be3ow5/cjEoyac8zWdwg==", + "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { - "@eclipse-glsp/sprotty": "2.3.0-next.381+d472c7a", + "@eclipse-glsp/sprotty": "2.3.0-next.390+accf3f9", "autocompleter": "^9.1.2", "file-saver": "^2.0.5", "lodash": "4.17.21", @@ -635,9 +636,10 @@ } }, "node_modules/@eclipse-glsp/protocol": { - "version": "2.3.0-next.381", - "resolved": "https://registry.npmjs.org/@eclipse-glsp/protocol/-/protocol-2.3.0-next.381.tgz", - "integrity": "sha512-rN17+zEZJxUxhSCMgtxIaf3YuJ+4H8CW+GtZWNmuiQic3ZsZEXhNZzXRiRGrlKB4lnQFI9u5BdYwqbqJ9aJqwQ==", + "version": "2.3.0-next.390", + "resolved": "https://registry.npmjs.org/@eclipse-glsp/protocol/-/protocol-2.3.0-next.390.tgz", + "integrity": "sha512-Jv95nt4UD+2WMgn47IvsYmiNIkhoiXArZ9ME35zNwbcZkJOR4C/7jKzR60JcVUd8pyVkV3Uq8BxiQ+p7+sbzfA==", + "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { "sprotty-protocol": "1.2.0", "uuid": "~10.0.0", @@ -648,11 +650,12 @@ } }, "node_modules/@eclipse-glsp/sprotty": { - "version": "2.3.0-next.381", - "resolved": "https://registry.npmjs.org/@eclipse-glsp/sprotty/-/sprotty-2.3.0-next.381.tgz", - "integrity": "sha512-0JQ+DlnM5l21wOn/pUVPebG24TqFQtq1IuDTYEo24ZzzRibb/fvW6PFi4v5BRAgxUnVh7YCDWsLW25rWD59gsw==", + "version": "2.3.0-next.390", + "resolved": "https://registry.npmjs.org/@eclipse-glsp/sprotty/-/sprotty-2.3.0-next.390.tgz", + "integrity": "sha512-3IAnpbJB7YceWhQfFPw/cxar2sDrNuFj2VdTBKS2gJzgC9yELzUZI6O26Xbkxucek2vM/zjyt0YIfubniqUToA==", + "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { - "@eclipse-glsp/protocol": "2.3.0-next.381+d472c7a", + "@eclipse-glsp/protocol": "2.3.0-next.390+accf3f9", "autocompleter": "^9.1.0", "snabbdom": "~3.5.1", "sprotty": "1.2.0", @@ -6567,9 +6570,10 @@ "dev": true }, "node_modules/autocompleter": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/autocompleter/-/autocompleter-9.3.0.tgz", - "integrity": "sha512-ykZIm9OZd99I+ee3139O6mqrw9Jdtlk3CwHdDIxtOjNAcxUBChza8f0wrgL4+ZvmHNZgosljKdHskRKuiYjFHQ==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/autocompleter/-/autocompleter-9.3.2.tgz", + "integrity": "sha512-rLbf2TLGOD7y+gOS36ksrZdIsvoHa2KXc2A7503w+NBRPrcF73zzFeYBxEcV/iMPjaBH3jFhNIYObZ7zt1fkCQ==", + "license": "MIT" }, "node_modules/available-typed-arrays": { "version": "1.0.7", @@ -9147,7 +9151,8 @@ "node_modules/file-saver": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", - "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==", + "license": "MIT" }, "node_modules/filelist": { "version": "1.0.4", @@ -14819,6 +14824,7 @@ "version": "3.5.1", "resolved": "https://registry.npmjs.org/snabbdom/-/snabbdom-3.5.1.tgz", "integrity": "sha512-wHMNIOjkm/YNE5EM3RCbr/+DVgPg6AqQAX1eOxO46zYNvCXjKP5Y865tqQj3EXnaMBjkxmQA5jFuDpDK/dbfiA==", + "license": "MIT", "engines": { "node": ">=8.3.0" } @@ -14968,6 +14974,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/sprotty/-/sprotty-1.2.0.tgz", "integrity": "sha512-/YL1+S+pLhV+hF0Z9C4vQGuaVv9NVsDgEqRnF+vevvdbeio1w8lfGxOMKjzY7DHcVDBQoKe0kbKJXvMr3f/RsA==", + "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { "autocompleter": "^9.1.2", "file-saver": "^2.0.5", @@ -14980,7 +14987,8 @@ "node_modules/sprotty-protocol": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/sprotty-protocol/-/sprotty-protocol-1.2.0.tgz", - "integrity": "sha512-SHu61Qiw7bAD2nyRqdOASSihVNbeEuKI7cQx+o9EeyLpbmXKX6NTcGSVpxmWztHUIP0I6gZhKnkhF/BWo46mUQ==" + "integrity": "sha512-SHu61Qiw7bAD2nyRqdOASSihVNbeEuKI7cQx+o9EeyLpbmXKX6NTcGSVpxmWztHUIP0I6gZhKnkhF/BWo46mUQ==", + "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)" }, "node_modules/ssri": { "version": "10.0.6", @@ -15455,7 +15463,8 @@ "node_modules/tinyqueue": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", - "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" + "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", + "license": "ISC" }, "node_modules/tinyrainbow": { "version": "1.2.0", @@ -16731,7 +16740,7 @@ "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { "@axonivy/process-editor-protocol": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "showdown": "^2.1.0", "toastify-js": "1.12.0" }, @@ -16757,7 +16766,7 @@ "@codingame/monaco-vscode-editor-service-override": "1.83.3", "@codingame/monaco-vscode-languages-service-override": "1.83.3", "@codingame/monaco-vscode-model-service-override": "1.83.3", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "react": "^18.3.1", "react-dom": "^18.3.1" }, @@ -16836,7 +16845,7 @@ "version": "12.0.1-next", "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { - "@eclipse-glsp/protocol": "2.3.0-next.381" + "@eclipse-glsp/protocol": "2.3.0-next.390" } }, "playwright": { diff --git a/packages/editor/package.json b/packages/editor/package.json index 2a68a55a..ee664261 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -19,7 +19,7 @@ ], "dependencies": { "@axonivy/process-editor-protocol": "~12.0.1-next", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "showdown": "^2.1.0", "toastify-js": "1.12.0" }, diff --git a/packages/editor/src/jump/action.ts b/packages/editor/src/jump/action.ts index 0fce7c30..daff1528 100644 --- a/packages/editor/src/jump/action.ts +++ b/packages/editor/src/jump/action.ts @@ -6,8 +6,8 @@ import { isViewport, Viewport, TYPES, - GLSPActionDispatcher, - SetViewportAction + SetViewportAction, + type IActionDispatcher } from '@eclipse-glsp/client'; import { SelectAllAction } from '@eclipse-glsp/protocol'; import { injectable, inject } from 'inversify'; @@ -19,7 +19,7 @@ import { JumpAction } from '@axonivy/process-editor-protocol'; @injectable() export class JumpActionHandler implements IActionHandler { - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; @inject(EditorContextService) protected readonly editorContext: EditorContextService; private jumpStack: Map = new Map(); diff --git a/packages/editor/src/tools/di.config.ts b/packages/editor/src/tools/di.config.ts index c0c45681..c3af7bd9 100644 --- a/packages/editor/src/tools/di.config.ts +++ b/packages/editor/src/tools/di.config.ts @@ -30,10 +30,10 @@ export const ivyChangeBoundsToolModule = new FeatureModule( // GSLP defaults configureCommand(context, ShowChangeBoundsToolResizeFeedbackCommand); configureCommand(context, HideChangeBoundsToolResizeFeedbackCommand); - bindAsService(context, TYPES.IDefaultTool, IvyChangeBoundsTool); // GLSP replacements bindAsService(context, TYPES.IChangeBoundsManager, IvyChangeBoundsManager); + bindAsService(context, TYPES.IDefaultTool, IvyChangeBoundsTool); configureView(context, GResizeHandle.TYPE, IvyResizeHandleView); }, { featureId: changeBoundsToolModule.featureId } diff --git a/packages/editor/src/tools/ivy-change-bounds-tool.ts b/packages/editor/src/tools/ivy-change-bounds-tool.ts index e2e913b0..55a1364f 100644 --- a/packages/editor/src/tools/ivy-change-bounds-tool.ts +++ b/packages/editor/src/tools/ivy-change-bounds-tool.ts @@ -1,7 +1,8 @@ import type { TrackedResize } from '@eclipse-glsp/client'; import { Bounds, ChangeBoundsListener, ChangeBoundsTool, ResizeHandleLocation, SetBoundsFeedbackAction } from '@eclipse-glsp/client'; import { LaneNode } from '../diagram/model'; - +import { injectable } from 'inversify'; +@injectable() export class IvyChangeBoundsTool extends ChangeBoundsTool { protected createChangeBoundsListener() { return new IvyChangeBoundsListener(this); diff --git a/packages/editor/src/ui-tools/quick-action/color/action-handler.ts b/packages/editor/src/ui-tools/quick-action/color/action-handler.ts index 47805bec..9625a35f 100644 --- a/packages/editor/src/ui-tools/quick-action/color/action-handler.ts +++ b/packages/editor/src/ui-tools/quick-action/color/action-handler.ts @@ -1,12 +1,12 @@ import { Action, - GLSPActionDispatcher, IActionHandler, ICommand, PaletteItem, RequestContextActions, SetContextActions, - TYPES + TYPES, + type IActionDispatcher } from '@eclipse-glsp/client'; import { injectable, inject } from 'inversify'; import { ShowQuickActionMenuAction } from '../quick-action-menu-ui'; @@ -14,7 +14,7 @@ import { UpdateColorPaletteAction, UpdatePaletteItems } from '@axonivy/process-e @injectable() export class ColorPaletteHandler implements IActionHandler { - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; protected paletteItems: PaletteItem[] = []; diff --git a/packages/editor/src/ui-tools/quick-action/color/action.ts b/packages/editor/src/ui-tools/quick-action/color/action.ts index 60666a13..5445fef5 100644 --- a/packages/editor/src/ui-tools/quick-action/color/action.ts +++ b/packages/editor/src/ui-tools/quick-action/color/action.ts @@ -1,4 +1,4 @@ -import { Action, GLSPActionDispatcher, PaletteItem, GModelElement, TYPES } from '@eclipse-glsp/client'; +import { Action, PaletteItem, GModelElement, TYPES, type IActionDispatcher } from '@eclipse-glsp/client'; import { QuickAction, QuickActionProvider } from '../quick-action'; import { ShowQuickActionMenuAction } from '../quick-action-menu-ui'; import { injectable, inject } from 'inversify'; @@ -11,7 +11,7 @@ import { LaneTypes } from '../../../diagram/view-types'; @injectable() export class SelectColorQuickActionProvider implements QuickActionProvider { @inject(IVY_TYPES.ColorPalette) protected readonly colors: ColorPaletteHandler; - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; singleQuickAction(element: GModelElement): QuickAction | undefined { if (element.type === LaneTypes.POOL) { diff --git a/packages/editor/src/ui-tools/quick-action/info/action.ts b/packages/editor/src/ui-tools/quick-action/info/action.ts index c5839888..f228e5cd 100644 --- a/packages/editor/src/ui-tools/quick-action/info/action.ts +++ b/packages/editor/src/ui-tools/quick-action/info/action.ts @@ -1,14 +1,14 @@ import { GArgument, GIssueMarker, - GLSPActionDispatcher, isWithEditableLabel, JsonAny, GChildElement, GEdge, GModelElement, TYPES, - hasArgs + hasArgs, + type IActionDispatcher } from '@eclipse-glsp/client'; import { QuickAction, SingleQuickActionProvider } from '../quick-action'; import { ShowInfoQuickActionMenuAction } from '../quick-action-menu-ui'; @@ -20,7 +20,7 @@ import { IvyIcons } from '@axonivy/ui-icons'; @injectable() export class InfoQuickActionProvider extends SingleQuickActionProvider { - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; @inject(IVY_TYPES.IvyViewerOptions) protected readonly options: IvyViewerOptions; singleQuickAction(element: GModelElement): QuickAction | undefined { diff --git a/packages/editor/src/ui-tools/quick-action/types/action-handler.ts b/packages/editor/src/ui-tools/quick-action/types/action-handler.ts index d758e724..a3ecad43 100644 --- a/packages/editor/src/ui-tools/quick-action/types/action-handler.ts +++ b/packages/editor/src/ui-tools/quick-action/types/action-handler.ts @@ -1,19 +1,19 @@ import { UpdatePaletteItems } from '@axonivy/process-editor-protocol'; import { Action, - GLSPActionDispatcher, IActionHandler, ICommand, PaletteItem, RequestContextActions, SetContextActions, - TYPES + TYPES, + type IActionDispatcher } from '@eclipse-glsp/client'; import { injectable, inject } from 'inversify'; @injectable() export class TypesPaletteHandler implements IActionHandler { - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; protected paletteItems: PaletteItem[] = []; diff --git a/packages/editor/src/ui-tools/quick-action/types/action.ts b/packages/editor/src/ui-tools/quick-action/types/action.ts index 946ccc41..b1d84150 100644 --- a/packages/editor/src/ui-tools/quick-action/types/action.ts +++ b/packages/editor/src/ui-tools/quick-action/types/action.ts @@ -1,4 +1,4 @@ -import { Action, GLSPActionDispatcher, PaletteItem, GModelElement, TYPES } from '@eclipse-glsp/client'; +import { Action, PaletteItem, GModelElement, TYPES, type IActionDispatcher } from '@eclipse-glsp/client'; import { QuickAction, SingleQuickActionProvider } from '../quick-action'; import { ShowQuickActionMenuAction } from '../quick-action-menu-ui'; import { injectable, inject } from 'inversify'; @@ -11,7 +11,7 @@ import { ChangeActivityTypeOperation } from '@axonivy/process-editor-protocol'; @injectable() export class SelectActivityTypeQuickActionProvider extends SingleQuickActionProvider { @inject(IVY_TYPES.ActivityTypesPalette) protected readonly types: TypesPaletteHandler; - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; singleQuickAction(element: GModelElement): QuickAction | undefined { if (isUnwrapable(element)) { diff --git a/packages/editor/src/ui-tools/tool-bar/node/action-handler.ts b/packages/editor/src/ui-tools/tool-bar/node/action-handler.ts index b9a4f7d5..a5eccd14 100644 --- a/packages/editor/src/ui-tools/tool-bar/node/action-handler.ts +++ b/packages/editor/src/ui-tools/tool-bar/node/action-handler.ts @@ -1,12 +1,12 @@ import { Action, - GLSPActionDispatcher, IActionHandler, ICommand, PaletteItem, RequestContextActions, SetContextActions, - TYPES + TYPES, + type IActionDispatcher } from '@eclipse-glsp/client'; import { injectable, inject } from 'inversify'; import { ToolBar } from '../tool-bar'; @@ -14,7 +14,7 @@ import { UpdatePaletteItems } from '@axonivy/process-editor-protocol'; @injectable() export class ElementsPaletteHandler implements IActionHandler { - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; protected paletteItems: Array = []; protected extensionItems: Promise>; diff --git a/packages/editor/src/ui-tools/tool-bar/tool-bar.ts b/packages/editor/src/ui-tools/tool-bar/tool-bar.ts index b1929691..ad409f37 100644 --- a/packages/editor/src/ui-tools/tool-bar/tool-bar.ts +++ b/packages/editor/src/ui-tools/tool-bar/tool-bar.ts @@ -5,7 +5,6 @@ import { EditorContextService, EnableDefaultToolsAction, EnableToolPaletteAction, - GLSPActionDispatcher, IActionHandler, ICommand, IEditModeListener, @@ -15,7 +14,8 @@ import { SelectionService, SetUIExtensionVisibilityAction, TYPES, - isNotUndefined + isNotUndefined, + type IActionDispatcher } from '@eclipse-glsp/client'; import { inject, injectable, multiInject, postConstruct } from 'inversify'; @@ -44,7 +44,7 @@ const CLICKED_CSS_CLASS = 'clicked'; export class ToolBar extends GLSPAbstractUIExtension implements IActionHandler, IEditModeListener, ISelectionListener { static readonly ID = 'ivy-tool-bar'; - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; @inject(SelectionService) protected readonly selectionService: SelectionService; @inject(EditorContextService) protected readonly editorContext: EditorContextService; @multiInject(IVY_TYPES.ToolBarButtonProvider) protected toolBarButtonProvider: ToolBarButtonProvider[]; diff --git a/packages/editor/src/ui-tools/viewport/viewport-bar.ts b/packages/editor/src/ui-tools/viewport/viewport-bar.ts index 3b7d7801..6b7cd288 100644 --- a/packages/editor/src/ui-tools/viewport/viewport-bar.ts +++ b/packages/editor/src/ui-tools/viewport/viewport-bar.ts @@ -1,7 +1,6 @@ import { Action, EditorContextService, - GLSPActionDispatcher, IActionHandler, ICommand, isViewport, @@ -10,7 +9,8 @@ import { SetViewportAction, TYPES, SelectionService, - GLSPAbstractUIExtension + GLSPAbstractUIExtension, + type IActionDispatcher } from '@eclipse-glsp/client'; import { inject, injectable } from 'inversify'; import { CenterButton, FitToScreenButton, OriginScreenButton, ViewportBarButton } from './button'; @@ -23,7 +23,7 @@ import { EnableViewportAction, SetViewportZoomAction } from '@axonivy/process-ed export class ViewportBar extends GLSPAbstractUIExtension implements IActionHandler { static readonly ID = 'ivy-viewport-bar'; - @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; @inject(TYPES.IToolManager) protected readonly toolManager: IToolManager; @inject(EditorContextService) protected readonly editorContext: EditorContextService; @inject(SelectionService) protected selectionService: SelectionService; diff --git a/packages/inscription/package.json b/packages/inscription/package.json index 53cb976d..83c5bb9b 100644 --- a/packages/inscription/package.json +++ b/packages/inscription/package.json @@ -17,7 +17,7 @@ "@codingame/monaco-vscode-editor-service-override": "1.83.3", "@codingame/monaco-vscode-languages-service-override": "1.83.3", "@codingame/monaco-vscode-model-service-override": "1.83.3", - "@eclipse-glsp/client": "2.3.0-next.381", + "@eclipse-glsp/client": "2.3.0-next.390", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/packages/inscription/src/inscription/inscription-ui.tsx b/packages/inscription/src/inscription/inscription-ui.tsx index a8e731bb..fe496ad9 100644 --- a/packages/inscription/src/inscription/inscription-ui.tsx +++ b/packages/inscription/src/inscription/inscription-ui.tsx @@ -6,15 +6,16 @@ import { Action, GArgument, GLSPAbstractUIExtension, - GLSPActionDispatcher, GModelRoot, IActionHandler, ISelectionListener, SelectAction, SelectAllAction, SelectionService, + TYPES, isNotUndefined, - isOpenable + isOpenable, + type IActionDispatcher } from '@eclipse-glsp/client'; import { webSocketConnection, type Connection } from '@axonivy/jsonrpc'; import type { MonacoLanguageClient } from 'monaco-languageclient'; @@ -32,7 +33,7 @@ export class InscriptionUi extends GLSPAbstractUIExtension implements IActionHan static readonly ID = 'inscription-ui'; @inject(SelectionService) protected readonly selectionService: SelectionService; - @inject(GLSPActionDispatcher) protected readonly actionDispatcher: GLSPActionDispatcher; + @inject(TYPES.IActionDispatcher) protected readonly actionDispatcher: IActionDispatcher; private inscriptionElement?: string; private action?: EnableInscriptionAction; diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 41da1a41..1191abae 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -18,7 +18,7 @@ "bpmn" ], "dependencies": { - "@eclipse-glsp/protocol": "2.3.0-next.381" + "@eclipse-glsp/protocol": "2.3.0-next.390" }, "scripts": { "clean": "rimraf lib tsconfig.tsbuildinfo",