Author: adietish
Date: 2012-02-15 11:49:59 -0500 (Wed, 15 Feb 2012)
New Revision: 38766
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/ApplicationConfigurationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
[JBIDE-10914] fixed the ability to change the embedded cartridges on an existing openshift
app
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-02-15
16:48:43 UTC (rev 38765)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-15
16:49:59 UTC (rev 38766)
@@ -68,7 +68,6 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
@@ -237,11 +236,6 @@
IObservableValue useExistingApplication =
WidgetProperties.selection().observe(useExistingAppBtn);
- enableApplicationWidgets(
- pageModel.isUseExistingApplication()
- , newAppConfigurationGroup
- , existingAppNameText
- , browseAppsButton);
useExistingApplication.addValueChangeListener(
onUseExistingApplication(newAppConfigurationGroup, existingAppNameText,
@@ -342,9 +336,7 @@
if (!useExisting) {
resetExistingApplication();
}
- enableApplicationWidgets(
- useExisting, applicationConfigurationGroup, applicationNameText,
- applicationBrowseButton);
+ enableApplicationWidgets(useExisting);
}
}
@@ -368,17 +360,14 @@
* @param applicationNameText
* @param applicationBrowseButton
*/
- private void enableApplicationWidgets(final Boolean useExisting, final Group
applicationConfigurationGroup,
- final Text applicationNameText, final Button applicationBrowseButton) {
- applicationNameText.setEnabled(useExisting);
- applicationBrowseButton.setEnabled(useExisting);
- UIUtils.doForAllChildren(new UIUtils.IWidgetVisitor() {
-
- @Override
- public void visit(Control control) {
- control.setEnabled(!useExisting);
- }
- }, applicationConfigurationGroup);
+ private void enableApplicationWidgets(final Boolean useExisting) {
+ existingAppNameText.setEnabled(useExisting);
+ browseAppsButton.setEnabled(useExisting);
+
+ newAppNameLabel.setEnabled(!useExisting);
+ newAppNameText.setEnabled(!useExisting);
+ newAppTypeLabel.setEnabled(!useExisting);
+ newAppCartridgeCombo.setEnabled(!useExisting);
}
private void fillCartridgesCombo(DataBindingContext dbc, Combo cartridgesCombo) {
@@ -664,11 +653,7 @@
Display.getDefault().asyncExec(new Runnable() {
public void run() {
loadOpenshiftResources(dbc);
- enableApplicationWidgets(
- pageModel.isUseExistingApplication()
- , newAppConfigurationGroup
- , existingAppNameText
- , browseAppsButton);
+ enableApplicationWidgets(pageModel.isUseExistingApplication());
}
});
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-15
16:48:43 UTC (rev 38765)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-15
16:49:59 UTC (rev 38766)
@@ -157,7 +157,6 @@
public void loadCartridges() throws OpenShiftException {
setCartridges(getUser().getCartridges());
- // setCartridges(OpenShiftUIActivator.getDefault().getUser().getCartridges());
}
public void setCartridges(List<ICartridge> cartridges) {
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-15
16:48:43 UTC (rev 38765)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-15
16:49:59 UTC (rev 38766)
@@ -157,12 +157,13 @@
public boolean performFinish() {
boolean success = getWizardModel().isUseExistingApplication();
if (!success) {
- if (createApplication()) {
- success = addRemoveCartridges(
- getWizardModel().getApplication(),
getWizardModel().getSelectedEmbeddableCartridges());
- }
+ success = createApplication();
}
if (success) {
+ success = addRemoveCartridges(
+ getWizardModel().getApplication(),
getWizardModel().getSelectedEmbeddableCartridges());
+ }
+ if (success) {
success = importProject();
}
Show replies by date