Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » DiagramEditor refresh behaviour (When is the diagramEditor refresh triggered?)
DiagramEditor refresh behaviour [message #1087271] Thu, 15 August 2013 11:51 Go to next message
Marco Roque is currently offline Marco RoqueFriend
Messages: 16
Registered: July 2012
Junior Member
Hi everyone,

I am trying to animate a BPMN2 diagram and for that i'm executing customFeature after customFeature, which sometimes results in the exception bellow.
From what i understand this happens because the diagram has its own Refresh Thread that is painting the diagram from time to time, sometimes at the same time as i am executing a customFeature. Am i wrong?

Or, on the other hand, is the refresh a result of the execution of a customFeature which leaves the diagram in a dirty state?

Is there any way to turn off the automatic refresh and be my code to control the refresh of the diagram?

sorry for the questioning...

Many thanks in advance.

at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$ Source)
at org.eclipse.graphiti.ui.internal.editor.DiagramRefreshJob.runInUIThread(
at org.eclipse.ui.progress.UIJob$
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(
at org.eclipse.swt.widgets.Display.runAsyncMessages(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
at org.eclipse.ui.internal.Workbench$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
at org.eclipse.ui.internal.ide.application.IDEApplication.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(
at org.eclipse.equinox.launcher.Main.main(

Marco Roque
Re: DiagramEditor refresh behaviour [message #1092909 is a reply to message #1087271] Fri, 23 August 2013 10:09 Go to previous message
Felix Velasco is currently offline Felix VelascoFriend
Messages: 43
Registered: July 2009
The refreshJob is launched by the platform as a response to the changes in the model (see DiagramChangeListener), so, yes, its periodical running is the result of launching CustomFeature after CustomFeature.

To prevent the ConcurrentModificacionException, you could try launching the CustomFeature in the UIThread (Display.syncExec).

Regarding your control of the refresh job, well, the answer is yes and no. No, you can't turn off automatic refresh (at least not easily), but yes you can control it, since it's running because of your changes.

All in all, the biggest problem with the animation is that your command stack will become polluted with all the small changes you are adding, and there's no way around that.
Previous Topic:DiagramEditor mouse over
Next Topic:Update/refresh automatically feature
Goto Forum:

Current Time: Sun Jun 20 12:41:21 GMT 2021

Powered by FUDForum. Page generated in 0.01994 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top