Author: adietish
Date: 2012-05-11 18:00:49 -0400 (Fri, 11 May 2012)
New Revision: 40963
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java
Log:
[JBIDE-10852] corrected addition strategy for 10gen (also add mongo), corrected removal
strategy for mongo (remove 10gen, rockmongo)
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java 2012-05-11
21:27:33 UTC (rev 40962)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java 2012-05-11
22:00:49 UTC (rev 40963)
@@ -212,7 +212,7 @@
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge.MONGODB_20);
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge.ROCKMONGO_11);
} else {
- viewer.setChecked(IEmbeddableCartridge.MONGODB_20, false);
+ viewer.setChecked(IEmbeddableCartridge.ROCKMONGO_11, false);
}
} else {
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge.PHPMYADMIN_34);
@@ -228,7 +228,17 @@
} else {
viewer.setChecked(IEmbeddableCartridge.MONGODB_20, true);
}
- } else {
+ } if (!viewer.getChecked(IEmbeddableCartridge.MONGODB_20)
+ && viewer.getChecked(IEmbeddableCartridge._10GEN_MMS_AGENT_01)) {
+ if (MessageDialog.openQuestion(getShell(), "Remove MongoDB cartridge",
+ "If you remove the MongoDB cartridge, you'd also have to remove 10gen MMS
agent.")) {
+ pageModel.unselectEmbeddedCartridges(IEmbeddableCartridge._10GEN_MMS_AGENT_01);
+ viewer.setChecked(IEmbeddableCartridge._10GEN_MMS_AGENT_01, false);
+ } else {
+ viewer.setChecked(IEmbeddableCartridge.MONGODB_20, true);
+ }
+ }
+ if (!viewer.getChecked(IEmbeddableCartridge.MONGODB_20)) {
pageModel.unselectEmbeddedCartridges(IEmbeddableCartridge.MONGODB_20);
}
}
@@ -241,7 +251,7 @@
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge.MONGODB_20);
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge._10GEN_MMS_AGENT_01);
} else {
- viewer.setChecked(IEmbeddableCartridge.MONGODB_20, false);
+ viewer.setChecked(IEmbeddableCartridge._10GEN_MMS_AGENT_01, false);
}
} else {
pageModel.selectEmbeddedCartridges(IEmbeddableCartridge.PHPMYADMIN_34);