Author: adietish
Date: 2012-05-11 16:47:24 -0400 (Fri, 11 May 2012)
New Revision: 40961
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java
Log:
[JBIDE-10852] refreshing application before resetting selected embedded cartridges
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java 2012-05-11
20:35:30 UTC (rev 40960)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java 2012-05-11
20:47:24 UTC (rev 40961)
@@ -187,13 +187,13 @@
});
}
- private void safeResetSelectedEmbeddedCartridges() {
+ private void safeRefreshSelectedEmbeddedCartridges() {
getShell().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
try {
- Set<IEmbeddableCartridge> selectedEmbeddableCartridges =
pageModel.resetSelectedEmbeddedCartridges();
+ Set<IEmbeddableCartridge> selectedEmbeddableCartridges =
pageModel.refreshSelectedEmbeddedCartridges();
viewer.setCheckedElements(
selectedEmbeddableCartridges.toArray());
} catch (Exception e) {
@@ -227,13 +227,13 @@
openLogDialog(addedCartridges);
queue.offer(true);
} catch (OpenShiftException e) {
- safeResetSelectedEmbeddedCartridges();
+ safeRefreshSelectedEmbeddedCartridges();
queue.offer(false);
return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
NLS.bind("Could not embed cartridges to application {0}",
pageModel.getApplication().getName()), e);
} catch (SocketTimeoutException e) {
- safeResetSelectedEmbeddedCartridges();
+ safeRefreshSelectedEmbeddedCartridges();
queue.offer(false);
return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
NLS.bind("Could not embed cartridges to application {0}",
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java 2012-05-11
20:35:30 UTC (rev 40960)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java 2012-05-11
20:47:24 UTC (rev 40961)
@@ -104,10 +104,11 @@
getSelectedEmbeddableCartridges().remove(cartridge);
}
- public Set<IEmbeddableCartridge> resetSelectedEmbeddedCartridges()
+ public Set<IEmbeddableCartridge> refreshSelectedEmbeddedCartridges()
throws OpenShiftException, SocketTimeoutException {
+ getApplication().refresh();
setSelectedEmbeddedCartridges(getApplication().getEmbeddedCartridges());
- return selectedCartridges;
+ return getSelectedEmbeddableCartridges();
}
/**
Show replies by date