autoupdate [message #1067759] |
Wed, 10 July 2013 13:19 |
Juliane Mueller Messages: 30 Registered: August 2011 |
Member |
|
|
Hi all,
I have an EMF Datamodel.
In case of changes in datamodel the method "updateneeded" is random called. Therefor I have a listener. This listener calls the method "update" in case of changes.
The method is called and I can define the differences. But if I want to add anything to the diagram an exception is thrown.
Has anyone an idea how I could autoupdate the diagram?
Here is my code:
In the listener:
UpdateContext updateContext = new UpdateContext(getDiagram().getChildren().get(0).getGraphicsAlgorithm().getPictogramElement());
IUpdateFeature updateFeature = getFeatureProvider().getUpdateFeature(updateContext);
updateFeature.update(updateContext);
and that's the exception:
!ENTRY org.eclipse.ui 4 0 2013-07-11 13:36:43.886
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalStateException: Cannot modify resource set without a write transaction)
Caused by: java.lang.IllegalStateException: Cannot modify resource set without a write transaction at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting
Regards, Juliane
[Updated on: Thu, 11 July 2013 12:05] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04649 seconds