Community
Participate
Working Groups
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/51116
Gerrit change https://git.eclipse.org/r/51116 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3654fcc127fdc08cc639aa6cb58985c14d137da3
Fixed through 3654fcc127fdc08cc639aa6cb58985c14d137da3.
New Gerrit change created: https://git.eclipse.org/r/51572
New Gerrit change created: https://git.eclipse.org/r/51602
Gerrit change https://git.eclipse.org/r/51602 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=a1deda615620a56d9e13422f14c5f6871091beda
Reopened because of new test failures due to SessionEditorInput.exists()/equals() call while aird behind session doesn't exists anymore.
Gerrit change https://git.eclipse.org/r/51641 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=abaa9eaad2a170642ace85540c639aba13115ac6
Gerrit change https://git.eclipse.org/r/51572 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=361c2b38cff7893a59e835b02cda45ce0c42c54f
Fixed with last commits.
New Gerrit change created: https://git.eclipse.org/r/52057
Gerrit change https://git.eclipse.org/r/52057 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=55dfe4b7fe8eee9bc5594570d436d9b29e2bcfd4
GoToMarkerTraceabilityWithUserInteractionTest fails since commit 55dfe4b7fe8eee9bc5594570d436d9b29e2bcfd4 The marker navigation service launch the diagram opening in a READ_ONLY transaction. Before this commit, transaction was created on the "error editor"'s empty/temp session but now with the commit, a new valid session is created and opened during this error editor opening, when a temporary SessionEditorInput is created from the FileEditorInput used by the marker service. Then the DDiagramEditor.gotoMarker was able to create a retrieve the right element and input and open the correct editor in a new session before closing the error editor (the user does not see the error editor except an error occurs during the opening of the valid editor). With the last commit, the session is created as soon as we call getSession() on the temporary session editor input as a new sesison is created by Esteban's commit when the known session is closed. Furthermore the current state seems to be able to reopen a previously closed session, IMO this is not safe on the existing code base.
New Gerrit change created: https://git.eclipse.org/r/52101
Gerrit change https://git.eclipse.org/r/52101 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ac2dfa46d2718dff66e18548c80889c1d198b490
Fixed.
Remains an issue, as the SessionEditorInput.uri field is not updated a SessionEditorInput.equals() can returns false instead of true. This is the failing scenario : Failing scenario with representations created in XPath based resource, InMemoryResourceImpl : 1. Create 2 diagrams named '1' & '2' 2. Open '1' 3. Open '2' 4. Close '1' 5. Open '1' 6. Reopen '2' => KO : a new editor is opened while the existing one should be reopened. We should override URIEditorInput.getURI() in SessionEditorInput to returns an updated uri.
New Gerrit change created: https://git.eclipse.org/r/54885
Gerrit change https://git.eclipse.org/r/54885 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6dd423b3acbb4c474faaa464161abe39cd89cb85
New Gerrit change created: https://git.eclipse.org/r/55377
Gerrit change https://git.eclipse.org/r/55377 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4f84a702df00f4648398c309a6d4783a65aaa53c
Validated with Sirius 3.1.0.201509241504
Available in Sirius 3.1.0.