Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 379160 - [ModelSet] Papyrus doesn't properly detect changes in workspace resources
Summary: [ModelSet] Papyrus doesn't properly detect changes in workspace resources
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 336811
Blocks: 317031
  Show dependency tree
 
Reported: 2012-05-10 12:51 EDT by Alain Lavoie CLA
Modified: 2013-06-11 07:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Lavoie CLA 2012-05-10 12:51:49 EDT
Build Identifier: Version: 3.7.2 Build id: M20120208-0800

A model cannot be read repeatedly with the Papyrus Core editor.
Even when doing 

+[Open with]->[Papyrus Editor Core] when selecting the
 uml internal file of the Papyrus Model (which opens the diagram
 correctly)
+[Show View]->[Model Explorer]
+[Save all] 

Papyrus is not selected has an editor to re-open the model.
It repeatedly opens it in text.

---

This behavior appeared while using qvto to transform a Papyrus model.
Although many attempts to reproduce the problem were realized, 
I have not been able to do so.  And unfortunately, in the process of 
trying to reproduce it, I lost the model in problem. 

Until I encounter it again, here is a behavior that might have an
influence on my problem:
+ Open Eclipse Papyrus
+ Create a model, create a diagram, add a package in the diagram
+ Save all
+ Move the package in the diagram.
+ While the model is open, execute a qvto script that add an element
  in the model (in my case, a packakedElement).
+ Open another valid Papyrus model
+ Eclipse request to save the actual model you modified (diagram modification)
  Answer yes.
+ Papyrus overwrite the model on disk, erasing the package added by the   
  qvto script, and that was witness to be existing in the model disk file.

I suspect that having multiple sessions (session1: eclipse+papyrus
session2: qvto modifying the model) using a model might not be 
handled correctly.  Maybe this is not a covered used case and not 
a requirement on the product.

I will try to reproduce it and attach it to this bug.

Meanwhile, in the fear of experimenting the problem again, which means
a lost of the model, I voluntarily choose to open a model m1 while 
transforming a model m2 and re-open the m2 model.

Regards.



Reproducible: Couldn't Reproduce

Steps to Reproduce:
1. See details 
2.
3.
Comment 1 Camille Letavernier CLA 2013-05-06 13:57:04 EDT
This bug probably already has a few duplicates. In general, Papyrus doesn't properly detect and handle changes in different resources.

I raise the severity to critical as this often leads to model corruption.
Comment 2 Camille Letavernier CLA 2013-06-10 08:31:28 EDT
Fixed in r11382

Side effects of Bug 336811 (Which will not be fixed until SR1) lead to unexpected "resource change" events. For example, making graphical changes in a library may be detected as a semantic change by a client of that library (Because the semantic model is actually written, although it hasn't been modified).
Comment 3 Camille Letavernier CLA 2013-06-11 07:45:17 EDT
Fixed in r11416:

A deadlock occurred when trying to Save & Close an editor because of an external modification in a read-only (imported) resource, resulting in an "Error during save". The "Save & close" is now ran asynchronously.