imixs / open-bpmn

BPMN Modeler based on Eclipse Graphical Language Server Platform
https://www.open-bpmn.org
Other
67 stars 11 forks source link

Remove SelectionListener Workaround in GLSP V2.0 #313

Closed rsoika closed 7 months ago

rsoika commented 9 months ago

Because of a problem with circular dependencies as discussed here we implemented a workaround with a custom ActionDispatcherFactory.

Changes in di.config.ts can be removed :

    bind(ActionDispatcherFactory).toFactory<GLSPActionDispatcher>(
        ctx => () => ctx.container.get<GLSPActionDispatcher>(TYPES.IActionDispatcher)
    );

and in the bpmn-select-listeners.txs module we can fall back to the normal injection and calling the ActionDispatcher

   @inject(TYPES.IActionDispatcher)
   protected actionDispatcher: ActionDispatcher;
  ...
    // finally dispatch the updated selected and unselected IDs...
    // this.actionDispatcher.dispatch(SelectAction.create({ selectedElementsIDs: selectedElements, deselectedElementsIDs: containerIDs    }));

async method updateSelectionData is no longer needed if the bug is solved.

rsoika commented 8 months ago

Things become better. But still not all issues solved.

Panel is not rendered. Seems to be a minor issue with the init of the UIExtension....