[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] JPA Diagram Editor vs. JPA Project Manager

Stefan et al:

I am making some changes to JpaProject and JpaProjectManager in an effort to
improve Dali's synchronization. In particular, I am adding API that can be used by
"long-running" processes that typically run on a background thread and make
significant changes to the Dali context model. This type of process can result in
race conditions where resource and Java change events triggered by the process
end up conflicting with the changes being made by the process itself.

While making these changes, I have removed and/or renamed various bits of API.
Some of these methods are used by the JPA Diagram Editor in ways I do not
understand. Maybe you can help me.

Can you please explain to me why you are calling JpaProject.updateAndWait()
in these methods:
Maybe we can figure out a better way to accomplish what you are trying to do.

Also, you make numerous calls to JpaProject.update(...) in CreateRelationsTest,
apparently waiting for some side-effect of the update to occur. I have removed
these loops and added a hook to your test plug-in (JPAEditorTestsActivator) that
causes all Dali event-handling and project updates to occur synchronously.
This is how the other Dali test plug-ins work around the difficulties of testing the
model when cascading changes happen asynchronously. With the loops removed
and the hook in place, the tests pass without a problem.