Bug 501500 - Pb with key of ModelAccessorsRegistry map
Summary: Pb with key of ModelAccessorsRegistry map
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1.0   Edit
Assignee: Laurent Redor CLA
QA Contact: Julien Dupont CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-09-15 10:06 EDT by Laurent Redor CLA
Modified: 2016-10-18 11:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2016-09-15 10:06:48 EDT
The key used for ModelAccessorsRegistry map is the URI of the first odesign resource of the resource set. It is strange.
For example, at a session creation, there is no Viewpoint selected, the key is "". For the same session, after Viewpoint selection, the ModelAccessor returned by the registry will not be the same (because the key is no longer "").

Furthermore, in some condition, this causes strange effect. For a session "sessionA" with an editingDomain using resourceSet "rsA", the result with these 2 expressions is not the same:
* PermissionAuthorityRegistry.getDefault().getPermissionAuthority(rsA);
* sessionA.getModelAccessor().getPermissionAuthority();

I have not simple reproduction use case. I'll try to add it later.
Comment 1 Eclipse Genie CLA 2016-09-15 10:53:17 EDT
New Gerrit change created: https://git.eclipse.org/r/81177
Comment 3 Eclipse Genie CLA 2016-09-19 13:03:47 EDT
New Gerrit change created: https://git.eclipse.org/r/81368
Comment 4 Laurent Redor CLA 2016-09-19 13:04:50 EDT
There is no real steps to reproduce. But the test of https://git.eclipse.org/r/81368 illustrates the problem.
Comment 6 Pierre-Charles David CLA 2016-10-18 11:06:29 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.