summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java')
-rw-r--r--platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java b/platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java
index e31b067e5d79..8d85ae106c44 100644
--- a/platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java
+++ b/platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java
@@ -116,11 +116,24 @@ public class RemoteConnectionCredentialsWrapper {
return new IllegalStateException("Unknown connection type"); //TODO
}
- public void copyTo(RemoteConnectionCredentialsWrapper copy) {
+ public void copyTo(final RemoteConnectionCredentialsWrapper copy) {
copy.myCredentialsTypeHolder = new UserDataHolderBase();
- copy.setPlainSshCredentials(getPlainSshCredentials());
- copy.setVagrantConnectionType(getVagrantCredentials());
- copy.setWebDeploymentCredentials(getWebDeploymentCredentials());
+ switchType(new RemoteSdkConnectionAcceptor() {
+ @Override
+ public void ssh(@NotNull RemoteCredentialsHolder cred) {
+ copy.setPlainSshCredentials(getPlainSshCredentials());
+ }
+
+ @Override
+ public void vagrant(@NotNull VagrantBasedCredentialsHolder cred) {
+ copy.setVagrantConnectionType(getVagrantCredentials());
+ }
+
+ @Override
+ public void deployment(@NotNull WebDeploymentCredentialsHolder cred) {
+ copy.setWebDeploymentCredentials(getWebDeploymentCredentials());
+ }
+ });
}
public String getId() {