[jbosstools-commits] JBoss Tools SVN: r43865 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 20 10:57:33 EDT 2012


Author: adietish
Date: 2012-09-20 10:57:32 -0400 (Thu, 20 Sep 2012)
New Revision: 43865

Added:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OkButtonWizardDialog.java
Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
Log:
[JBIDE-11912] Replaced "Cancel" and "Finish" buttons by single "OK" button in manage ssh keys wizard

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java	2012-09-20 14:31:58 UTC (rev 43864)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java	2012-09-20 14:57:32 UTC (rev 43865)
@@ -16,8 +16,8 @@
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.jboss.tools.common.ui.WizardUtils;
 import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.ui.wizard.OkButtonWizardDialog;
 import org.jboss.tools.openshift.express.internal.ui.wizard.ssh.ManageSSHKeysWizard;
 
 /**
@@ -35,7 +35,7 @@
 			Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
 			if (selectedElement instanceof UserDelegate) {
 				UserDelegate user = (UserDelegate) selectedElement;
-				WizardUtils.openWizardDialog(new ManageSSHKeysWizard(user), HandlerUtil.getActiveShell(event));
+				new OkButtonWizardDialog(HandlerUtil.getActiveShell(event), new ManageSSHKeysWizard(user)).open();
 			}
 		}
 		return null;

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java	2012-09-20 14:31:58 UTC (rev 43864)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java	2012-09-20 14:57:32 UTC (rev 43865)
@@ -31,7 +31,6 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.common.ui.WizardUtils;
 import org.jboss.tools.common.ui.databinding.ParametrizableWizardPageSupport;
 import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
 import org.jboss.tools.openshift.express.internal.ui.databinding.RequiredControlDecorationUpdater;
@@ -85,7 +84,7 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				WizardUtils.openWizardDialog(new ManageSSHKeysWizard(pageModel.getUser()), getShell());
+				new OkButtonWizardDialog(getShell(), new ManageSSHKeysWizard(pageModel.getUser())).open();
 			}
 		};
 	}

Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OkButtonWizardDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OkButtonWizardDialog.java	                        (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OkButtonWizardDialog.java	2012-09-20 14:57:32 UTC (rev 43865)
@@ -0,0 +1,22 @@
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class OkButtonWizardDialog extends WizardDialog {
+
+	public OkButtonWizardDialog(Shell parentShell, IWizard newWizard) {
+		super(parentShell, newWizard);
+	}
+	
+	protected Control createButtonBar(Composite parent) {
+		Control control = super.createButtonBar(parent);
+		getButton(IDialogConstants.FINISH_ID).setText("OK");
+		getButton(CANCEL).setVisible(false);
+		return control;
+	}
+}


Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OkButtonWizardDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain



More information about the jbosstools-commits mailing list