Author: adietish
Date: 2010-11-15 05:46:45 -0500 (Mon, 15 Nov 2010)
New Revision: 26547
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7317] removed type assertion. Converter must be able to handle
non-DeltaCloudServerType values.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-15 10:39:41
UTC (rev 26546)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-15 10:46:45
UTC (rev 26547)
@@ -2,6 +2,8 @@
* src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
(createControl):
[JBIDE-7317] removed erroneous, duplicate type binding.
+ (DeltaCloudTypeLabelAdapter.handleValueChange):
+ [JBIDE-7317] removed type assertion. Converter must be able to handle
non-DeltaCloudServerType values.
2010-11-12 André Dietisheim <adietish(a)redhat.com>
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-11-15
10:39:41 UTC (rev 26546)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-11-15
10:46:45 UTC (rev 26547)
@@ -25,7 +25,6 @@
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
@@ -132,12 +131,11 @@
@Override
public void handleValueChange(ValueChangeEvent event) {
Object newValue = event.diff.getNewValue();
- Assert.isTrue(newValue instanceof DeltaCloudServerType);
- setLabelText((DeltaCloudServerType) newValue);
+ setLabelText(newValue);
}
- private void setLabelText(DeltaCloudServerType cloudType) {
- if (cloudType != null && cloudType != DeltaCloudServerType.UNKNOWN) {
+ private void setLabelText(Object cloudType) {
+ if (cloudType != null && !DeltaCloudServerType.UNKNOWN.equals(cloudType)) {
typeLabel.setText(cloudType.toString());
} else {
typeLabel.setText("?"); // $NON-NLS-1$
Show replies by date