[jbosstools-commits] JBoss Tools SVN: r43803 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Sep 18 13:15:33 EDT 2012
Author: adietish
Date: 2012-09-18 13:15:33 -0400 (Tue, 18 Sep 2012)
New Revision: 43803
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPageModel.java
Log:
[JBIDE-11912] implementing "Add new SSH key"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPage.java 2012-09-18 16:59:25 UTC (rev 43802)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPage.java 2012-09-18 17:15:33 UTC (rev 43803)
@@ -16,8 +16,11 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.databinding.viewers.ViewerProperties;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -38,6 +41,8 @@
import org.jboss.tools.openshift.express.internal.ui.utils.SSHUtils;
import org.jboss.tools.openshift.express.internal.ui.wizard.AbstractOpenShiftWizardPage;
+import com.openshift.client.SSHKeyType;
+
/**
* @author André Dietisheim
*/
@@ -80,6 +85,24 @@
ControlDecorationSupport.create(
nameBinding, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
+ Label typeLabel = new Label(newSSHKeyGroup, SWT.NONE);
+ typeLabel.setText("Key Type:");
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).applyTo(typeLabel);
+
+ ComboViewer typeCombo = new ComboViewer(newSSHKeyGroup, SWT.DEFAULT);
+ typeCombo.setContentProvider(ArrayContentProvider.getInstance());
+ typeCombo.setInput(SSHKeyType.values());
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).applyTo(typeCombo.getControl());
+ ValueBindingBuilder.bind(
+ ViewerProperties.singleSelection().observe(typeCombo))
+ .to(BeanProperties.value(NewSSHKeyWizardPageModel.PROPERTY_TYPE).observe(typeCombo))
+ .in(dbc);
+ Label fillerLabel = new Label(newSSHKeyGroup, SWT.NONE);
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).applyTo(fillerLabel);
+
Label ssh2HomeLabel = new Label(newSSHKeyGroup, SWT.NONE);
GridDataFactory.fillDefaults()
.align(SWT.LEFT, SWT.CENTER).applyTo(ssh2HomeLabel);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPageModel.java 2012-09-18 16:59:25 UTC (rev 43802)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ssh/NewSSHKeyWizardPageModel.java 2012-09-18 17:15:33 UTC (rev 43803)
@@ -24,7 +24,7 @@
public static final String PROPERTY_PRIVATEKEY_PATH = "privateKeyPath";
public static final String PROPERTY_PRIVATEKEY_PASSPHRASE = "privateKeyPassphrase";
- private SSHKeyType type;
+ private SSHKeyType type = SSHKeyType.SSH_RSA;
private String ssh2Home;
private String privateKeyPath;
private String privateKeyPathphrase;
More information about the jbosstools-commits
mailing list