Community
Participate
Working Groups
In createConnectionView() (which is final, so it really makes extending a pain) there is a TODO - remove hack. This hack makes the edge view that will be created persisted if the edge source or target is not transient. I have a transient connection between a transient source, and a non-transient target. This makes my diagram come up dirty.
After removing the hack, I see that the diagram is being set to dirty because of two reaons. SetConnectionEndsCommand is setting the source and target on the edge. This is causing the inverse relationship to add the edge to the views source edges/target edges. If the view that it's being connected to is persisted, the notification triggers the dirty adapter to change the dirty state. Maybe View should contain transientSources and transientTargets. Additionally, the SetConnectionBendpointsCommand is executed which sets bendspoints on the Edge. The DirtyAdapter is setting the diagram to dirty because a non-transient feature of RelativeBendpoints object is being set. My suggesion here is that since this object is contained within a completely transient object (the edge), it should not affect the dirty state. Please give this defect high priority, since this problem is hard to work around and its affecting my progress.
We considered a fix for this before but it required notation meta-model change. The fix was to add a non-persisted source and target edge features on a node.
I'm requesting that priority be given to this defect. I found another serious flaw that is exposed by this problem. When creating a connection from a transient node to a non transient node, the create edge command sets the node's sourceEdges feature to the new edge. This feature is non-transient, so it causes the EMF model to serialize the transient node (and all of its transient parents) the next time it is saved. During re-load, these transient children (managed by canonical edit policies) are removed and cause the diagram to turn dirty.
Could I have a status update? This is a major item for me since it causes the diagram to show dirty on open.
adding api keyword since this change requires notation meta-model changes...
- Changed the Notation meta model and the Canonical connection edit policy to support the creation of Transient edges across Persisted views. The change will affect the file format, it is forward compatible
[target cleanup] 1.0 M5 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug