Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Porhel2018-07-13 14:39:59 +0000
committerMaxime Porhel2018-07-18 14:38:31 +0000
commit93d7ad362ecd1cfa7d73021d48d9eb82cd023e7b (patch)
tree5e0c2361bb36914d5f97252150a7443e918d84b3
parenta02c00b276cee700aa31053489f4facdcea75944 (diff)
downloadorg.eclipse.sirius-93d7ad362ecd1cfa7d73021d48d9eb82cd023e7b.tar.gz
org.eclipse.sirius-93d7ad362ecd1cfa7d73021d48d9eb82cd023e7b.tar.xz
org.eclipse.sirius-93d7ad362ecd1cfa7d73021d48d9eb82cd023e7b.zip
[537112] Fix unwanted display of * in the Model Explorer view
The dirty status of a Session in the Model Explorer view depends on the SAVE_WHEN_NO_EDITOR preference. If the preference value is true (default behavior), the status is hidden as soon as a DialectEditor (diagram/table/tree) is opened as this status is displayed in the editor tab. Sirius 5.0 introduced the Aird editor and the ISiriusEditor API as supertype of DialectEditor. This commit generalizes the display behavior of "*" (dirty status) from DialectEditor to all ISiriusEditor. Bug: 537112 Cherry-picked-from: 537111 Change-Id: Id9288fd837b19d398425ac069bc95f9c6640b4f7 Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SiriusCommonLabelProvider.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SiriusCommonLabelProvider.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SiriusCommonLabelProvider.java
index 001a2c40b1..329f73549c 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SiriusCommonLabelProvider.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/navigator/SiriusCommonLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2016 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2011, 2018 THALES GLOBAL SERVICES and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -287,8 +287,8 @@ public class SiriusCommonLabelProvider extends ColumnLabelProvider implements IC
boolean shouldBeSavedWithoutEditor = preferenceStore != null && preferenceStore.getBoolean(SiriusUIPreferencesKeys.PREF_SAVE_WHEN_NO_EDITOR.name());
// When option PREF_SAVE_WHEN_NO_EDITOR is enabled, show dirty
- // status only when there si no editors to detect bugs.
- if (SessionStatus.DIRTY == session.getStatus() && (!shouldBeSavedWithoutEditor || uiSession.getEditors().isEmpty())) {
+ // status only when there is no editors to detect bugs.
+ if (SessionStatus.DIRTY == session.getStatus() && (!shouldBeSavedWithoutEditor || uiSession.getSiriusEditors().isEmpty())) {
return true;
}

Back to the top