Community
Participate
Working Groups
When using a transactional editing domain, EEF has to be adapted to have all model mutations executed through the command stack of that editing domain with commands. The EEFTreeMasterPart class writes to the model directly, which results in the exception further below. This is the code fragment for the "add" button on the MasterPart. EList<EObject> list = (EList<EObject>) modelRoot.eGet(commandParameter.getReference()); list.add(EcoreUtil.create(commandParameter.geteClass())); try { modelRoot.eResource().save(Collections.EMPTY_MAP); } catch (IOException e1) { e1.printStackTrace(); } I would like to adapt this to use a command. Would this be any benefit for the project? Are any changes planned in this area? 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.processObjectNotification(TransactionChangeRecorder.java:284) at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:240) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:255) 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.emf.eef.runtime.ui.widgets.masterdetails.tree.EEFTreeMasterPart$2$1.widgetSelected(EEFTreeMasterPart.java:285)
Created attachment 183994 [details] patch for this.
Patch included in 0.8 and 0.9