Author: adietish
Date: 2012-05-10 15:48:08 -0400 (Thu, 10 May 2012)
New Revision: 40925
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
Log:
cleanup: replaced wizard dialog opening code by util method
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java 2012-05-10
19:34:16 UTC (rev 40924)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java 2012-05-10
19:48:08 UTC (rev 40925)
@@ -12,8 +12,8 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -39,9 +39,7 @@
final IApplication application = (IApplication) treeSelection.getFirstElement();
final UserDelegate user = UserModel.getDefault().getRecentUser();
EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(application, user);
- WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
- dialog.create();
- int result = dialog.open();
+ int result = WizardUtils.openWizardDialog(wizard,
Display.getCurrent().getActiveShell());
if(result == Dialog.OK) {
viewer.refresh(application);
}
Show replies by date