Author: adietish
Date: 2011-03-14 09:38:01 -0400 (Mon, 14 Mar 2011)
New Revision: 29759
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
Log:
[JBIDE-8584] ensured updates to widgets happens in display thread
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-14 12:50:30
UTC (rev 29758)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-14 13:38:01
UTC (rev 29759)
@@ -1,3 +1,9 @@
+2011-03-14 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ *
src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
(updateCloudSelector):
+ * src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java (propertyChange):
+ [JBIDE-8584] ensured updates to widgets happens in display thread
+
2011-03-09 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/ui/views/cloud/property/CVPropertySheetPage.java
(selectionChanged):
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java 2011-03-14
12:50:30 UTC (rev 29758)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java 2011-03-14
13:38:01 UTC (rev 29759)
@@ -14,6 +14,7 @@
import java.beans.PropertyChangeListener;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.views.cloud.property.CloudPropertySource;
@@ -59,6 +60,12 @@
@Override
public void propertyChange(PropertyChangeEvent event) {
- viewer.update(this, new String[] { DeltaCloud.PROP_NAME });
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ viewer.update(CloudItem.this, new String[] { DeltaCloud.PROP_NAME });
+ }
+ });
}
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-03-14
12:50:30 UTC (rev 29758)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-03-14
13:38:01 UTC (rev 29759)
@@ -361,17 +361,24 @@
}
}
- private void updateCloudSelector(DeltaCloud cloud) {
+ private void updateCloudSelector(final DeltaCloud cloud) {
DeltaCloud[] clouds = getClouds();
- int index = getCloudIndex(cloud, clouds);
- if (index >= 0) {
- int selectionIndex = currentCloudSelector.getSelectionIndex();
- currentCloudSelector.removeModifyListener(currentCloudModifyListener);
- currentCloudSelector.setItem(index, cloud.getName());
- currentCloudSelector.select(selectionIndex);
- currentCloudSelector.addModifyListener(currentCloudModifyListener);
- }
- container.layout(true, true);
+ final int index = getCloudIndex(cloud, clouds);
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (index >= 0) {
+ int selectionIndex = currentCloudSelector.getSelectionIndex();
+ currentCloudSelector.removeModifyListener(currentCloudModifyListener);
+ currentCloudSelector.setItem(index, cloud.getName());
+ currentCloudSelector.select(selectionIndex);
+ currentCloudSelector.addModifyListener(currentCloudModifyListener);
+ }
+ container.layout(true, true);
+
+ }
+ });
}
public void cloudsChanged(final int type, final DeltaCloud cloud) {
Show replies by date