Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #471456 +++ In our Sirius based application in which we don't have workspace but instead have our models stored on a server, we use a InMemoryResourceImpl to store locally DRepresentations loaded from server. By default in Sirius, with a workspace, a AirdResourceImpl is used which use UUID to have URI of object as unique ID but with InMemoryResourceImpl or even BinaryResourceImpl this is not the case, xpath based URI fragment is used in this case. This has bad effect of don't opening the correct representation with the following scenario : 1. Have a session with a InMemoryResourceImpl as main sessionResource with URI "memory:data.togafin-memory.aird" 2. Load a DRepresentation r1 in this InMemoryResourceImpl, the URI of this DRepresentation will be "memory:data.togafin-memory.aird#//@ownedViews.0/@ownedRepresentations.0" 3. Open a Sirius editor on this DRepresentation r1 4. Load a DRepresentation r2 in this InMemoryResourceImpl, the URI of this DRepresentation will be "memory:data.togafin-memory.aird#//@ownedViews.0/@ownedRepresentations.1" 5. Open a Sirius editor on this DRepresentation r2 6. Open the Sirius editor of DRepresentation r1 7. Unload the DRepresentation r1 from the InMemoryResourceImpl, the URI of the DRepresentation r2 will become "memory:data.togafin-memory.aird#//@ownedViews.0/@ownedRepresentations.0" 8. Load again DRepresentation r1 in this InMemoryResourceImpl, the URI of this DRepresentation will be "memory:data.togafin-memory.aird#//@ownedViews.0/@ownedRepresentations.1" 9. Open a Sirius editor on this DRepresentation r1 => KO the editor is not opened, instead the editor of the second representation is shown. It seems comes from use of URIEditorInput through SessionEditorInput, indeed the URIEditorInput compare only URI. Then to fix that, SessionEditorInput should override URIEditorInput.equals() to test also input equality.
New Gerrit change created: https://git.eclipse.org/r/51164
Finally will not be backported.
Available in Sirius 3.0.1 released on 2015-09-10.