Author: adietish
Date: 2012-05-11 18:24:48 -0400 (Fri, 11 May 2012)
New Revision: 40966
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java
Log:
[JBIDE-10852] added comments
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
22:20:12 UTC (rev 40965)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeStrategy.java 2012-05-11
22:24:48 UTC (rev 40966)
@@ -40,6 +40,9 @@
* A UI strategy that is able to add and remove embedded cartridges while
* fullfilling requirements and resolving conflicts (ex. mutual exclusivity
* etc.)
+ * <p>
+ * TODO: replaced this manual code by a generic dependency-tree analysis
+ * mechanism as soon as OpenShift completed design of cartridge metamodel
*
* @author Andre Dietisheim
*/
@@ -49,7 +52,7 @@
private IEmbedCartridgesWizardPageModel pageModel;
private IWizardPage wizardPage;
- public EmbedCartridgeStrategy(CheckboxTableViewer viewer,
+ public EmbedCartridgeStrategy(CheckboxTableViewer viewer,
IEmbedCartridgesWizardPageModel pageModel, IWizardPage wizardPage) {
this.viewer = viewer;
this.wizardPage = wizardPage;
@@ -191,8 +194,9 @@
private void removeMySQL() throws OpenShiftException, SocketTimeoutException {
if (viewer.getChecked(IEmbeddableCartridge.PHPMYADMIN_34)) {
- if (MessageDialog.openQuestion(getShell(), "Remove phpmyadmin cartridge",
- "If you remove the mysql cartridge, you'd also have to remove
phpmyadmin.\n\nRemove phpMyAdmin and MySQL?")) {
+ if (MessageDialog
+ .openQuestion(getShell(), "Remove phpmyadmin cartridge",
+ "If you remove the mysql cartridge, you'd also have to remove
phpmyadmin.\n\nRemove phpMyAdmin and MySQL?")) {
pageModel.unselectEmbeddedCartridges(IEmbeddableCartridge.PHPMYADMIN_34);
pageModel.unselectEmbeddedCartridges(IEmbeddableCartridge.MYSQL_51);
viewer.setChecked(IEmbeddableCartridge.PHPMYADMIN_34, false);
@@ -229,8 +233,8 @@
} else {
removeMongoDb = false;
}
- }
-
+ }
+
if (removeMongoDb // mongo to be removed?
&& viewer.getChecked(IEmbeddableCartridge._10GEN_MMS_AGENT_01)) {
if (MessageDialog.openQuestion(getShell(), "Remove MongoDB cartridge",
@@ -241,7 +245,7 @@
removeMongoDb = false;
}
}
-
+
viewer.setChecked(IEmbeddableCartridge.MONGODB_20, !removeMongoDb);
if (removeMongoDb) { // mongo to be removed?
pageModel.unselectEmbeddedCartridges(IEmbeddableCartridge.MONGODB_20);
@@ -263,7 +267,6 @@
}
}
-
private Shell getShell() {
return viewer.getControl().getShell();
}