Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2017-12-22 09:28:00 +0000
committerStéphane Bégaudeau2017-12-22 11:10:16 +0000
commitff7a6821d348bc7a5a554899bf8c0bfb9c232fa9 (patch)
treea1ca6882e70b54bf96b3d02aefe831c1587d4a39
parent4f353e1fe5d96da0d32b052ce008d2355f44703c (diff)
downloadorg.eclipse.eef-ff7a6821d348bc7a5a554899bf8c0bfb9c232fa9.tar.gz
org.eclipse.eef-ff7a6821d348bc7a5a554899bf8c0bfb9c232fa9.tar.xz
org.eclipse.eef-ff7a6821d348bc7a5a554899bf8c0bfb9c232fa9.zip
[529128] Fix a selection issue with List during refresh
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=529128 Change-Id: I1b2cd5d7d55d62cd0dd2066b32a5ffc08eb2e4e0 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFListLifecycleManager.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFListLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFListLifecycleManager.java
index e7ae7f877..9cf1c414e 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFListLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFListLifecycleManager.java
@@ -30,7 +30,6 @@ import org.eclipse.eef.ide.ui.internal.EEFIdeUiPlugin;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.sirius.common.interpreter.api.IInterpreter;
import org.eclipse.sirius.common.interpreter.api.IVariableManager;
@@ -254,8 +253,7 @@ public class EEFListLifecycleManager extends AbstractEEFWidgetLifecycleManager {
*/
private void setListValue(Object value) {
if (!this.tableViewer.getTable().isDisposed()) {
- final ISelection selection = new StructuredSelection(value);
- tableViewer.setSelection(selection);
+ final ISelection selection = this.tableViewer.getSelection();
List<Object> values = new ArrayList<Object>();
if (value instanceof Iterable<?>) {
@@ -266,6 +264,7 @@ public class EEFListLifecycleManager extends AbstractEEFWidgetLifecycleManager {
values.add(value);
}
tableViewer.setInput(values.toArray());
+ tableViewer.setSelection(selection);
}
}

Back to the top