Community
Participate
Working Groups
Currently save process of EMTLResource do a model modification in its save method. This is not expected by EMF Transaction and it's not advised in a general way See http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg31691.html Here is the stacktrace : java.lang.IllegalStateException: Cannot modify resource set without a write transaction at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:348) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:302) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processResourceNotification(TransactionChangeRecorder.java:272) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:238) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.dispatchNotification(NotifyingListImpl.java:267) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:300) at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307) at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.getPositions(EMtlResourceImpl.java:252) at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doSave(EMtlResourceImpl.java:95) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1406) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithFileBuffer(ResourceImpl.java:1017) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:976)
Thanks to a piece of code from cbrun (eSetDeliver(false); ... eSetDeliver(true);) this should not be a problem anymore. I will test it with Acceleo 3.1 M6 next week.
Acceleo does not send any notifications during the saving process anymore. The fix will be available in Acceleo 3.1.0M7.