diff --git a/glsp-client/tasklist-theia/src/browser/diagram/edit-input-signals-context-menu.ts b/glsp-client/tasklist-theia/src/browser/diagram/edit-input-signals-context-menu.ts index 94b668e65fe138f9e71d78d127995faacb41485c..e5bbb7a1b93ab533e4345b7b8607d808211ec362 100644 --- a/glsp-client/tasklist-theia/src/browser/diagram/edit-input-signals-context-menu.ts +++ b/glsp-client/tasklist-theia/src/browser/diagram/edit-input-signals-context-menu.ts @@ -18,7 +18,7 @@ import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integra import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core'; import { ApplicationShell } from '@theia/core/lib/browser'; import { inject, injectable } from 'inversify'; -import { EditInputSignalMenu } from 'tasklist-glsp'; +import { isTransition, EditInputSignalMenu } from 'tasklist-glsp'; export namespace EditInputSignalsMenuCommand { export const EDIT_INPUT_SIGNALS_MENU = 'edit-input-signals-menu-command'; @@ -37,7 +37,7 @@ export class EditInputSignalsMenuCommandContribution implements CommandContribut visible: true }) ], - isEnabled: context => !context.isReadonly + isEnabled: context => !context.isReadonly && context.selectedElements.filter(isTransition).length === 1 }) ); } diff --git a/glsp-client/tasklist-theia/src/browser/diagram/reset-markings-context-menu.ts b/glsp-client/tasklist-theia/src/browser/diagram/reset-markings-context-menu.ts index 9fbfea11b747d79c1f13567f7b7c26e19412c597..2f00eba3a132f57f69016a3e3e82553211c9375f 100644 --- a/glsp-client/tasklist-theia/src/browser/diagram/reset-markings-context-menu.ts +++ b/glsp-client/tasklist-theia/src/browser/diagram/reset-markings-context-menu.ts @@ -17,7 +17,7 @@ import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integra import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core'; import { ApplicationShell } from '@theia/core/lib/browser'; import { inject, injectable } from 'inversify'; -import { ResetMarkingsOperation } from 'tasklist-glsp'; +import { isPlace, ResetMarkingsOperation } from 'tasklist-glsp'; export namespace ResetMarkingsCommand { export const RESET_MARKINGS = 'reset-markings-command'; @@ -31,7 +31,7 @@ export class ResetMarkingsCommandContribution implements CommandContribution { { id: ResetMarkingsCommand.RESET_MARKINGS, label: 'Reset Markings' }, new GLSPCommandHandler(this.shell, { actions: context => [ResetMarkingsOperation.create()], - isEnabled: context => !context.isReadonly + isEnabled: context => !context.isReadonly && context.selectedElements.filter(isPlace).length === 1 }) ); }