Author: adietish
Date: 2012-06-01 09:12:09 -0400 (Fri, 01 Jun 2012)
New Revision: 41624
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-11954] forced ListUpdateStrategy to use old non-moving strategy (old strategy does:
add & remove, new strategy does: move instead)
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-06-01
13:04:06 UTC (rev 41623)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-06-01
13:12:09 UTC (rev 41624)
@@ -302,8 +302,24 @@
dbc.bindList(WidgetProperties.items().observe(gearProfilesCombo),
BeanProperties.list(ApplicationConfigurationWizardPageModel.PROPERTY_GEAR_PROFILES).observe(pageModel),
new UpdateListStrategy(UpdateListStrategy.POLICY_NEVER),
- new UpdateListStrategy().setConverter(new GearProfileToStringConverter()));
+ new UpdateListStrategy() {
+ /**
+ * Needed to avoid buggy list update strategy in
+ * ListBinding. The bug appears if the model list changes
+ * its ordering and the strategy then tries to apply the
+ * move in the target (widget). It does not apply the
+ * conversion and ends up in a class cast exception when
+ * updating the target (widget) items list.
+ *
+ * @see
https://issues.jboss.org/browse/JBIDE-11954
+ */
+ protected boolean useMoveAndReplace() {
+ return false;
+ }
+
+ }.setConverter(new GearProfileToStringConverter()));
+
final ISWTObservableValue selectedGearProfileComboObservable =
WidgetProperties.selection().observe(gearProfilesCombo);
final IObservableValue selectedGearProfileModelObservable = BeanProperties.value(
@@ -695,12 +711,11 @@
/**
*
- * @return
- private boolean ensureHasSshKey() {
-
- }
+ * @return private boolean ensureHasSshKey() {
+ *
+ * }
*/
-
+
protected void loadOpenshiftResources(final DataBindingContext dbc) {
try {
WizardUtils.runInWizard(new Job("Loading existing applications...") {