file Modifying a diagram from a thread

4 months 1 week ago - 4 months 1 week ago #5759 by querrec
I created a thread in my module in order to receive information from outside. According to those information, I want to modify the color of an ActionNode in an activity diagram.

It seems that it is not feasable from the thread. Do you know a way to do it ?

Thanks for help.

Please Log in or Create an account to join the conversation.

4 months 1 day ago #5762 by chm
Hi querrec,

In Modelio, diagram edition is considered as a graphic operation, and therefore needs to be conducted in the SWT Display thread.

You can try using this:
Display.getDefault().asyncExec(() -> {
  // TODO modify the diagram
}

Hope this helps,


CHM

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.039 seconds
^ Back to Top