Bug 497080 - Do not make opened but not visible diagrams dirty
Summary: Do not make opened but not visible diagrams dirty
Status: RESOLVED INVALID
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-06-30 07:29 EDT by Axel RICHARD CLA
Modified: 2016-06-30 07:48 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 Axel RICHARD CLA 2016-06-30 07:29:16 EDT
When several diagrams are opened, if you make changes in the visible one, it becomes dirty.
But all other opened diagrams become dirty too, even if they are not related (semantically or graphically) with the visible one.

Is it an expected behavior ? I don't know why these diagrams become dirty, even though they don't change.
Comment 1 Maxime Porhel CLA 2016-06-30 07:46:27 EDT
Hi Axel, 

This is the expected behavior: all the opened editors from the same Modeling Project share the same ResourceSet, the same EditingDomain and the same CommandStack, those objects are wrapped into the concept of Session. 

The editors of a same session will also share the same "status": dirty or sync. It tells you that some resources have been modified. If your session is composed of several aird files and several semantic model files, the editors will shows the global status of the session and not just the status of their current aird or of the semantic resources they represent.
The save action on one of those editor will save all the modified resources of the current session. 

When you execute a tool in an editor, it will do some modification on the semantic model which might impact the other opened editor but this is nit always the case, it depends on your semantic model, your Viewpoint Specification Model and the set of opened editors.

Rgds,
Comment 2 Maxime Porhel CLA 2016-06-30 07:47:27 EDT
I close this issue as this not a bug but was a question about a central behavior of Sirius.
Comment 3 Maxime Porhel CLA 2016-06-30 07:48:53 EDT
See the documentation (https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#Lifecycle):

> Besides, all representations of a given modeling project are part of the same model. Any modification to one of these 
> representations will cause all of them to go dirty (which means that a little * symbol will be displayed in the editor title to 
> indicate that the file contains unsaved modifications). Conversely, saving any representation of a modeling project saves all of 
> them. What is actually saved is the representations file, which contains all the representations.