Community
Participate
Working Groups
Reproducable: always. Steps to reproduce: 1. Create two diagrams with the tutorial plug-in (diagram type "tutorial") 2. Create an EClass and copy it 3. Paste EClass shape in the other diagram 4. Establish drill-down from one EClass with Custom->Associate diagram 5. Ensure both editors are dirty (e.g. move shapes) 6. Save one editor and change to the other editor by clicking its tab 7. The "File Conflict" pop-up dialogue will appear From user point of vies this is not acceptable and intrinsincly confusing, since he is working with two different diagrams and the business object of the EClass has not been changed.
Behind the scenes: 1) The created EClass is stored in the resource of the diagram in which it is created 2) Copying & pasting the EClass only copies the shapes but references the same EClass object from both diagrams now 3) In the diagram the EClass was pasted to only a reference to the EClass in the other resource is stored and this other resource is loaded on demand by EMF 4) For this second resource that is loaded on demand the flag "modification tracking" is not enabled 5) Saving this diagram (the one the EClass was pasted to) after a pure diagram change saves both resources: the own diagram resource (there are changes, since the shape was moved) and also the other diagram resource in which in fact nothing changed, since it is loaded without modification tracking set 6) Activating the other diagram notifies the user of the external change to the diagram resource So technically fully understandable but hard to grasp for users. 2 things to consider: - Try to set modification tracking for all resources. This will in the above scenario prevent the save on the second diagram resource (step 5) - Consider seperating diagram and domain data resources for the tutorial right from the beginning. (This will not actually solve the above issue, but will help in making such scenarios easier to understand. BTW, this is also the recommended way to build tools using Graphiti.) Michael
Would like to target for Juno
the bug is fixed in the bug336488 branch. we supply the save_only_if_changed option to the resource save.
Will not become part of juno M4 because it is part of the larger editor API changes. Will be integrated in head in the early M5 timeframe
Has been integrated back into master and pushed to Eclipse. Retest was done
*** Bug 371730 has been marked as a duplicate of this bug. ***
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)