### Eclipse Workspace Patch 1.0
#P org.jboss.tools.deltacloud.ui
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java	(revision 28609)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java	(working copy)
@@ -10,13 +10,9 @@
  *******************************************************************************/
 package org.jboss.tools.internal.deltacloud.ui.wizards;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.wizard.Wizard;
 import org.jboss.tools.common.jobs.ChainedJob;
@@ -107,7 +103,6 @@
 		Exception e = null;
 		try {
 			if (isProceed()) {
-				warnSshPrivateKey(keyId);
 				instance = cloud.createInstance(name, imageId, realmId, profileId, keyId, memory, storage);
 				if (instance != null) {
 					result = true;
@@ -130,23 +125,6 @@
 		return result;
 	}
 
-	private void warnSshPrivateKey(String keyId) {
-		try {
-			File file = PemFileManager.getFile(keyId, SshPrivateKeysPreferences.getSshKeyDirectory());
-			boolean isKnowPrivateKey = SshPrivateKeysPreferences.contains(file.getAbsolutePath());
-
-			if (!isKnowPrivateKey) {
-				MessageDialog
-						.openWarning(
-								getShell(),
-								"Instance key is not private key",
-								"The instance key you have chosen is not known to the ssh subsystem. If you need this key to connect to your instance, you'll have to download it and add it to the private keys in the SSH preferences.");
-			}
-		} catch (FileNotFoundException e) {
-
-		}
-	}
-
 	private void scheduleJobs() {
 		ChainedJob first =
 				new InstanceStateJob(
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java	(revision 28609)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java	(working copy)
@@ -50,20 +50,32 @@
 		sshPrivateKeyPreference.add(keyName);
 	}
 
-	/**
-	 * Adds the given keyName to the ssh-preferences
-	 * 
-	 * @param keyName
-	 *            the name of the key to add
-	 */
-	public static boolean contains(String keyName) {
+	public static boolean contains(File key) {
+		if (key == null) {
+			return false;
+		}
+
+		String keyPath = key.getAbsolutePath();
 		for (String privateKey : sshPrivateKeyPreference.get()) {
-			if (privateKey.equals(keyName)) {
+			if (keyPath.equals(getAbsoluteKeyPath(privateKey))) {
 				return true;
 			}
 		}
 		return false;
 	}
+
+	private static String getAbsoluteKeyPath(String keyName) {
+		try {
+			if (keyName != null && !keyName.startsWith(File.separator)) {
+				StringBuilder builder = new StringBuilder(getSshKeyDirectory());
+				builder.append(File.separatorChar).append(keyName);
+				return builder.toString();
+			}
+		} catch (FileNotFoundException e) {
+			// ignore
+		}
+		return keyName;
+	}
 	
 	/**
 	 * Removes the given keyName from the ssh-preferences
Index: src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java	(revision 28609)
+++ src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java	(working copy)
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.jboss.tools.internal.deltacloud.ui.wizards;
 
+import java.io.File;
+import java.io.FileNotFoundException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -403,12 +405,10 @@
 				WidgetProperties.text(SWT.Modify).observeDelayed(KEY_CHECK_DELAY, text),
 				BeanProperties.value(NewInstancePageModel.class, NewInstancePageModel.PROPERTY_KEYID).observe(model),
 				new UpdateValueStrategy()
-						.setBeforeSetValidator(
+						.setAfterGetValidator(
 								new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_KEYNAME)))
 						.setBeforeSetValidator(
 								new KeyValidator()),
-								// TODO: internationalize strings
-
 				null);
 		ControlDecorationSupport.create(textBinding, SWT.LEFT | SWT.TOP);
 	}
@@ -420,6 +420,11 @@
 			if (value instanceof String
 					&& ((String) value).length() > 0) {
 				if (doesKeyExist((String) value)) {
+					if (!isKeyKnowToSsh((String) value)) {
+						return ValidationStatus
+								.warning(
+								"Key not found under SSH preferences, might be needed for login after launch.");
+					}
 					return ValidationStatus.ok();
 				}
 			}
@@ -427,6 +432,15 @@
 					"The key is not known to cloud \"{0}\"", cloud.getName()));
 		}
 
+		private boolean isKeyKnowToSsh(String keyId) {
+			try {
+				File file = PemFileManager.getFile(keyId, SshPrivateKeysPreferences.getSshKeyDirectory());
+				return SshPrivateKeysPreferences.contains(file);
+			} catch (FileNotFoundException e) {
+				return false;
+			}
+		}
+
 		private boolean doesKeyExist(String keyId) {
 			try {
 				return cloud.getKey(keyId) != null;
