Transactional Editing Domain and Parsley Example, Soliciting Feedback [message #1766288] |
Mon, 19 June 2017 23:43  |
|
Hello All,
I am new to both transactional editing domains and EMF Parsley. I pushed some proof of concept code with a couple test cases that seem to work locally :) Of note: it should be able to work with or without OSGi; usage of TransactionalEditingDomain.Registry.INSTANCE implies OSGi via Equinox Extension Registry.
I would appreciate feedback on the following questions:
- Are there Parsley or transactional editing domain specific recommendations you would make?
- Are there important components that are lacking tests / insufficiently tested?
- Anything else important you think I should know about?
Feel free to comment here or on the project's GitHub page and thanks!
|
|
|
|
Re: Transactional Editing Domain and Parsley Example, Soliciting Feedback [message #1768101 is a reply to message #1768064] |
Thu, 13 July 2017 15:01  |
|
Not shown in the sample code is the below binding:
import org.eclipse.emf.parsley.internal.databinding.DataBindingHelper
//...
// wrap strategies within a transaction
type DataBindingHelper -> TransactionalDataBindingHelper
A specialized DataBindingHelper needs to be injected because the EmfValidationTargetToModelUpdateValueStrategy.doSet method needs to be called within a transaction. Otherwise, attempts to update objects that are in a transactional editing domain are rolled back if they do not occur in a transaction. I noticed this on at least one component created by Parsley.
I might create a bug suggesting to move DataBindingHelper to a non-internal package namespace unless you have other suggestions to try out?
Unrelated to the above, transactional editing domains expose the ResourceSetListener API. This conceptually acts as an EContentAdapter that notifies on changes on resource sets under the transactional editing domain (post-transaction if desired). It uses NotificationFilters to limit notifications to arbitrary granularity. Overall, it makes a nice EMF notification "bus". So if you end up trying out transactional editing domains, I recommend playing there too!
|
|
|
Powered by
FUDForum. Page generated in 0.02397 seconds