summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/remote
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/remote')
-rw-r--r--platform/platform-impl/src/com/intellij/remote/RemoteConnectionCredentialsWrapper.java21
-rw-r--r--platform/platform-impl/src/com/intellij/remote/VagrantSupport.java5
2 files changed, 22 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() {
diff --git a/platform/platform-impl/src/com/intellij/remote/VagrantSupport.java b/platform/platform-impl/src/com/intellij/remote/VagrantSupport.java
index a5ebae6fe567..9e2b60a54416 100644
--- a/platform/platform-impl/src/com/intellij/remote/VagrantSupport.java
+++ b/platform/platform-impl/src/com/intellij/remote/VagrantSupport.java
@@ -21,6 +21,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.util.Consumer;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -43,6 +44,10 @@ public abstract class VagrantSupport {
@NotNull
public abstract RemoteCredentials getVagrantSettings(@NotNull Project project, String vagrantFolder);
+ public abstract void getVagrantSettingsAsync(@Nullable Project project,
+ @NotNull String vagrantFolder,
+ @NotNull Consumer<RemoteCredentials> onSuccess);
+
@NotNull
public abstract RemoteCredentials getCredentials(@NotNull String folder) throws IOException;