Bug 418060: [e4] ECPModelView only provides the first object of a
structured selection with multiple objects to the ESelectionService,
applied patch
diff --git a/extra/org.eclipse.emf.ecp.application.e4/src/org/eclipse/emf/ecp/e4/view/ECPModelView.java b/extra/org.eclipse.emf.ecp.application.e4/src/org/eclipse/emf/ecp/e4/view/ECPModelView.java
index 5af9d3e..e68a0fc 100644
--- a/extra/org.eclipse.emf.ecp.application.e4/src/org/eclipse/emf/ecp/e4/view/ECPModelView.java
+++ b/extra/org.eclipse.emf.ecp.application.e4/src/org/eclipse/emf/ecp/e4/view/ECPModelView.java
@@ -71,7 +71,11 @@
if (IStructuredSelection.class.isInstance(selection)) {
final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
if (!structuredSelection.isEmpty()) {
- selectionService.setSelection(structuredSelection.getFirstElement());
+ if (structuredSelection.toList().size() == 1) {
+ selectionService.setSelection(structuredSelection.getFirstElement());
+ } else {
+ selectionService.setSelection(structuredSelection.toList());
+ }
}
}
}