Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Porhel2015-07-16 16:40:16 +0000
committerMaxime Porhel2015-07-16 16:40:16 +0000
commitac2dfa46d2718dff66e18548c80889c1d198b490 (patch)
treeb741051ed44b2bf2b47f5785bca82918312de4ab
parente93202c930689e010dffd1e15ae8595cfcc55513 (diff)
downloadorg.eclipse.sirius-ac2dfa46d2718dff66e18548c80889c1d198b490.tar.gz
org.eclipse.sirius-ac2dfa46d2718dff66e18548c80889c1d198b490.tar.xz
org.eclipse.sirius-ac2dfa46d2718dff66e18548c80889c1d198b490.zip
[471456] Correct the GoToMarker behavior.
The temporary session created during the opening of the error editor is closed. The real session will be created during the DiagramEditor.gotoMarker() call. A new session must not be created and opened in this case to avoid to refresh the opened diagram during a READ_ONLY transaction. Bug: 471456 Change-Id: I5c4b4151bfe8d5672acb39b06512f452b84cd716 Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/session/SessionEditorInput.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/session/SessionEditorInput.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/session/SessionEditorInput.java
index eb3694978c..8c4fdb5db1 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/session/SessionEditorInput.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/session/SessionEditorInput.java
@@ -108,7 +108,9 @@ public class SessionEditorInput extends URIEditorInput {
*/
private Session getSession(boolean restore) {
Session session = sessionRef != null ? sessionRef.get() : null;
- if (session == null || !session.isOpen()) {
+ // Avoid to create a new session if the default editor name is used:
+ // GoToMarker case.
+ if (session == null || (!session.isOpen() && !DEFAULT_EDITOR_NAME.equals(name))) {
URI sessionModelURI = getURI().trimFragment();
if (sessionResourceURI != null) {
sessionModelURI = sessionResourceURI;

Back to the top