use of com.intellij.remote.RemoteFile in project intellij-community by JetBrains.
the class PyRemotePackageManagerImpl method getHelperPath.
@Nullable
@Override
protected String getHelperPath(String helper) throws ExecutionException {
final Sdk sdk = getSdk();
final SdkAdditionalData sdkData = sdk.getSdkAdditionalData();
if (sdkData instanceof PyRemoteSdkAdditionalDataBase) {
final PyRemoteSdkAdditionalDataBase remoteSdkData = (PyRemoteSdkAdditionalDataBase) sdkData;
try {
String helpersPath;
if (CaseCollector.useRemoteCredentials(remoteSdkData)) {
final RemoteSdkCredentials remoteSdkCredentials = remoteSdkData.getRemoteSdkCredentials(false);
helpersPath = remoteSdkCredentials.getHelpersPath();
} else {
helpersPath = remoteSdkData.getHelpersPath();
}
if (!StringUtil.isEmpty(helpersPath)) {
return new RemoteFile(helpersPath, helper).getPath();
} else {
return null;
}
} catch (InterruptedException e) {
LOG.error(e);
} catch (ExecutionException e) {
throw analyzeException(e, helper, Collections.<String>emptyList());
}
}
return null;
}
Aggregations