Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Barbin2015-08-17 08:03:54 +0000
committerFlorian Barbin2015-08-17 08:03:54 +0000
commitc53b0f75fcca110f7f0e1e54d0e4eff446c8153d (patch)
tree0c9225be06acd5b8e33901917c23f855c40d5f13
parent109ee2542ea00a24e0cc76bcc2e2b0bbaeedd691 (diff)
downloadorg.eclipse.sirius-c53b0f75fcca110f7f0e1e54d0e4eff446c8153d.tar.gz
org.eclipse.sirius-c53b0f75fcca110f7f0e1e54d0e4eff446c8153d.tar.xz
org.eclipse.sirius-c53b0f75fcca110f7f0e1e54d0e4eff446c8153d.zip
[460610] Avoids abusive representation node selection.
* When selecting in the model explorer view an element which is not in the current representation, because of an empty selection list, the representation was selected. Bug: 460610 Change-Id: I1a49b04b25bbfc82543c5f3665f22f85150b53a4 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
index fd20ef9ed8..0a88aabee4 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
@@ -119,7 +119,9 @@ public class SiriusDialectLinkWithEditorSelectionListener implements ISelectionC
page.bringToTop(activeEditor);
DialectEditor dialectEditor = (DialectEditor) activeEditor;
List<DRepresentationElement> representationElements = getRepresentationElements(dialectEditor.getRepresentation(), ((IStructuredSelection) selection).toList());
- DialectUIManager.INSTANCE.setSelection(dialectEditor, representationElements);
+ if (!representationElements.isEmpty()) {
+ DialectUIManager.INSTANCE.setSelection(dialectEditor, representationElements);
+ }
}
} else {
Set<EObject> targets = getTargetsFromSelection((IStructuredSelection) selection);

Back to the top