Make TestCase independant of Filesystem capability to set readOnly

Use a ResourceChangeListener to make the test fail if a file which
was explicitely marked as readonly ends up being modified.
Add a warning in SiriusDiagramTestCase that readonly might not be
supported on the FS.
[cleanup] Add .DS_Store file to .gitignore

The file is generated by Mac OS™.

Change-Id: If604f9a01a3a0d93e954536c6c162427099d18ec
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
Make TestCase independant SiriusDiagramTestCase.setReadOnly
[442289] Rename distribute actions

* Distribute With Uniform Gaps Horizontally --> Distribute Gaps
Horizontally
* Distribute Centers Evenly Horizontally --> Distribute Centers
Horizontally
* Distribute With Uniform Gaps Vertically --> Distribute Gaps Vertically
* Distribute Centers Evenly Vertically --> Distribute Centers Vertically

Bug: 442289
Change-Id: Ia7382bd43f963fcfda7f41b3ce12ce601ec7c122
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[432982] Revert test added before merging corresponding fix

This test will be added again in the corresponding review
https://git.eclipse.org/r/#/c/33886/

Bug: 432982
Change-Id: I218f82bfdf7082bf3ec414a6b83c16704c28b708
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[430724] Session.save will now postpone the save in post-commit

Bug: 430724
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr>
Improve IsModifiedSavingPolicy to avoid False Positives

This adaptation of IsModifiedSavingPolicy is closer to the
SavingPolicyImpl strategy:
1. it uses the resource.isModified state as a basis to compute
what needs to be saved. Any resource marked has having been migrated
will also be considered "logically modified".
2. it browse the other resources to detect dependencies toward
resources which are modified
3. it filter this set of logically modified resources by serializing
them in a file buffer and comparing the result with the current file.

This strategy has the following characteristics :
- we avoid many serializations compared to the SavingPolicyImpl
  implementation by using the isModified boolean
- On the other hand we might browse the models, but this is made in a
  way that proxies should not be resolved. In practice this did not even
  came up in the profiling traces.
- we will never ever actually save the file if there is no change (just
  like the previous policy)
- If we *miss* a resource in the first step and don't consider it
logically modified whereas we should, its a bug and some resources might
not have been saved.

Also this commit makes sure only platform:/resources are considered
(which is important for CDOResources for instance, we don't need to
browse the model there, or Ecore resource with http:// URIs, we don't
need to send PUT on the Eclipse Server...)
It make sures non existing files will be saved anyway as their
"isModifed" status would not be enough for a resource which just got
created in memory for instance.
It also makes the IsModifiedSavingPolicy ignore resource.isLoaded
when deciding whether a resource has changes or not. This is necessary
to keep the same behavior as the reference policy.

Bug: 430724
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr
Introduce a ResourceMigrationMarker

This marker might be attached to a Resource to indicate that
some automatic migration *might* have change the structure
of the model during the loading (with no isModified flag)

This forces the IsModifiedSavingPolicy to consider this resource as
"logically modified".

This marker is automatically removed when the resource is processed
by the saving policy which checked that the serialization has no
difference with the current file content.

Bug: 430724
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr
Activate IsModifiedSavingPolicy by default

Bug: 430724
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr