Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Created March 8, 2012 12:32
Show Gist options
  • Save maxandersen/2000808 to your computer and use it in GitHub Desktop.
Save maxandersen/2000808 to your computer and use it in GitHub Desktop.
diff --git a/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java b/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java
index fceb935..a1bb4d0 100644
--- a/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java
+++ b/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java
@@ -16,6 +16,7 @@ import org.eclipse.wst.server.ui.internal.wizard.fragment.NewServerWizardFragmen
import org.eclipse.wst.server.ui.internal.wizard.fragment.TasksWizardFragment;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
@@ -37,8 +38,9 @@ public class CreateServerAdapterAction extends AbstractAction {
&& treeSelection.getFirstElement() instanceof IApplication) {
final IApplication application = (IApplication) treeSelection.getFirstElement();
IUser user = application.getUser();
+
NewServerWizard w = new NewServerWizard(ExpressServerUtils.OPENSHIFT_SERVER_TYPE);
- w.getTaskModel().putObject(ExpressServerUtils.TASK_WIZARD_ATTR_USER, user);
+ w.getTaskModel().putObject(ExpressServerUtils.TASK_WIZARD_ATTR_USER, UserModel.getDefault().findUser(user.getRhlogin()));
w.getTaskModel().putObject(ExpressServerUtils.TASK_WIZARD_ATTR_SELECTED_APP, application);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), w);
dialog.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment