### Eclipse Workspace Patch 1.0 #P org.jboss.tools.deltacloud.ui Index: ChangeLog =================================================================== --- ChangeLog (revision 29564) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2011-03-08 André Dietisheim + + * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (createWidgets): + [JBIDE-8293] added link to SSH2 private keys in preferences + 2011-02-02 André Dietisheim * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java (onImageDoubleclick): Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties =================================================================== --- src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties (revision 29564) +++ src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties (working copy) @@ -83,6 +83,7 @@ ErrorMustProvideName.text=A name must be specified ErrorMustProvideKeyName.text=A key name must be specified ErrorMustProvideImageId.text=An image id must be specified +ShowSSH2Preferences.label=Show Private Keys in preferences NewInstance.desc=Specify details for a new instance you wish to launch based on an image NewInstance.title=Launch Instance =================================================================== --- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (revision 29564) +++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (working copy) @@ -44,6 +44,7 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -54,10 +55,14 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.dialogs.PreferencesUtil; import org.jboss.tools.common.log.StatusFactory; import org.jboss.tools.deltacloud.core.DeltaCloud; import org.jboss.tools.deltacloud.core.DeltaCloudException; @@ -79,6 +84,8 @@ */ public class NewInstancePage extends WizardPage { + private static final String SSH_PREFERENCE_PAGE_ID = "org.eclipse.jsch.ui.SSHPreferences"; + private static final int IMAGE_CHECK_DELAY = 500; private static final int KEY_CHECK_DELAY = 500; @@ -100,6 +107,7 @@ private static final String MUST_ENTER_IMAGE_ID = "ErrorMustProvideImageId.text"; //$NON-NLS-1$ private static final String LOADING_VALUE = "Loading.value"; //$NON-NLS-1$ private static final String IMAGE_ID_NOT_FOUND = "ErrorImageIdNotFound.text"; //$NON-NLS-1$ + private static final String SSH2_PREF_KEYS = "ShowSSH2Preferences.label"; //$NON-NLS-1$ private Composite container; private NewInstancePageModel model; @@ -211,6 +219,23 @@ keyManageButton.addSelectionListener(manageListener); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(keyManageButton); + Label dummyLabel = new Label(container, SWT.NULL); + dummyLabel.setVisible(false); + GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(dummyLabel); + + Link sshPrefsLink = new Link(container, SWT.NULL); + sshPrefsLink.setText(WizardMessages.getString(SSH2_PREF_KEYS)); + sshPrefsLink.addListener(SWT.Selection, new Listener() { + + @Override + public void handleEvent(Event event) { + PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( + event.display.getActiveShell(), SSH_PREFERENCE_PAGE_ID, null, null); + dialog.open(); + } + }); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(2, 1).applyTo(sshPrefsLink); + Label hardwareLabel = new Label(container, SWT.NULL); hardwareLabel.setText(WizardMessages.getString(HARDWARE_LABEL)); GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(hardwareLabel);