Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2015-08-06 08:46:20 +0000
committerSebastian Struckmann2015-08-06 08:46:20 +0000
commitd28af4ee46669dabb6dfdab0e703544eede9da9f (patch)
treee387bc3c52cc8e95c5e40323175e114052fb2d29 /org.eclipse.jubula.client.ui.rcp
parentc59455262e4f25d032a3fc0095a8cd16ae0cc971 (diff)
downloadorg.eclipse.jubula.core-d28af4ee46669dabb6dfdab0e703544eede9da9f.tar.gz
org.eclipse.jubula.core-d28af4ee46669dabb6dfdab0e703544eede9da9f.tar.xz
org.eclipse.jubula.core-d28af4ee46669dabb6dfdab0e703544eede9da9f.zip
Non-sprint task - Avoid invalid thread access in CTDE
Diffstat (limited to 'org.eclipse.jubula.client.ui.rcp')
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/CentralTestDataEditor.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/CentralTestDataEditor.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/CentralTestDataEditor.java
index 8bd65cc87..9c62635df 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/CentralTestDataEditor.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/CentralTestDataEditor.java
@@ -443,16 +443,22 @@ public class CentralTestDataEditor extends AbstractJBEditor implements
public void handleParamChanged() {
// assuming that the currently selected element (or rather,
// all currently selected elements) have had some kind of param change
- ISelection currentSelection = getMainTreeViewer().getSelection();
- if (currentSelection instanceof IStructuredSelection) {
- for (Object selectedObj
- : ((IStructuredSelection)currentSelection).toArray()) {
- if (selectedObj instanceof ITestDataCubePO) {
- getElementsToRefresh().add((ITestDataCubePO)selectedObj);
+ Plugin.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ ISelection currentSelection = getMainTreeViewer()
+ .getSelection();
+ if (currentSelection instanceof IStructuredSelection) {
+ for (Object selectedObj : ((IStructuredSelection)
+ currentSelection).toArray()) {
+ if (selectedObj instanceof ITestDataCubePO) {
+ getElementsToRefresh().add(
+ (ITestDataCubePO)selectedObj);
+ }
+ }
}
+ getMainTreeViewer().refresh();
}
- }
- getMainTreeViewer().refresh();
+ });
}
/** {@inheritDoc} */

Back to the top