From 82af64e6e9398d4ce33751e44f65a37c11f50c9c Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Wed, 18 Jun 2014 11:21:04 +0200 Subject: [PATCH] Refactor sdk credentials producing for simpler reuse. --- .../remote/PythonRemoteInterpreterManager.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java b/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java index d7b7d27dd412..429be6c9197f 100644 --- a/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java +++ b/python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java @@ -15,6 +15,7 @@ */ package com.jetbrains.python.remote; +import com.google.common.base.Function; import com.intellij.execution.ExecutionException; import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.execution.configurations.ParamsGroup; @@ -40,7 +41,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.awt.*; -import java.io.IOException; import java.nio.charset.Charset; import java.util.Collection; import java.util.List; @@ -145,14 +145,16 @@ public abstract class PythonRemoteInterpreterManager { public abstract SdkAdditionalData loadRemoteSdkData(Sdk sdk, Element additional); - public abstract boolean testConnection(@NotNull RemoteCredentials credentials); - public abstract PyConsoleProcessHandler createConsoleProcessHandler(Process process, PyRemoteSdkCredentials data, PythonConsoleView view, PydevConsoleCommunication consoleCommunication, String commandLine, Charset charset, PathMappingSettings settings); + @NotNull + public abstract RemoteSdkCredentialsProducer getRemoteSdkCredentialsProducer(Function credentialsTransformer, + RemoteConnectionCredentialsWrapper connectionWrapper); + public static class PyRemoteInterpreterExecutionException extends ExecutionException { public PyRemoteInterpreterExecutionException() { @@ -167,15 +169,6 @@ public abstract class PythonRemoteInterpreterManager { } } - @Nullable - public abstract RemoteCredentials getVagrantRemoteCredentials(@NotNull VagrantBasedCredentialsHolder data) throws IOException; - - public abstract boolean checkVagrantStatus(@NotNull final String vagrantFolder, boolean runIfDown); - public abstract void runVagrant(String vagrantFolder) throws ExecutionException; - - public abstract void checkVagrantStatus(VagrantBasedCredentialsHolder data); - - public abstract RemoteCredentials getCredentialsBySftpServerId(String id); }