use of org.jetbrains.idea.svn.SvnConfigurationState in project intellij-community by JetBrains.
the class SshTunnelRuntimeModule method buildTunnelCommandLine.
@NotNull
private GeneralCommandLine buildTunnelCommandLine(@NotNull String sshPath) {
GeneralCommandLine result = new GeneralCommandLine(sshPath);
boolean isPuttyLinkClient = StringUtil.endsWithIgnoreCase(FileUtil.getNameWithoutExtension(sshPath), "plink");
SvnConfigurationState state = getState();
// quiet mode
if (!isPuttyLinkClient) {
result.addParameter("-q");
}
result.addParameters(isPuttyLinkClient ? "-P" : "-p", String.valueOf(state.sshPort));
if (!StringUtil.isEmpty(state.sshUserName)) {
result.addParameters("-l", state.sshUserName);
}
if (SvnConfiguration.SshConnectionType.PRIVATE_KEY.equals(state.sshConnectionType) && !StringUtil.isEmpty(state.sshPrivateKeyPath)) {
result.addParameters("-i", FileUtil.toSystemIndependentName(state.sshPrivateKeyPath));
}
return result;
}
use of org.jetbrains.idea.svn.SvnConfigurationState in project intellij-community by JetBrains.
the class SshSettingsPanel method reset.
@Override
public void reset(@NotNull SvnConfiguration settings) {
SvnConfigurationState state = settings.getState();
setConnectionChoice(state.sshConnectionType);
myExecutablePathField.setText(state.sshExecutablePath);
myUserNameField.setText(state.sshUserName);
myPortField.setNumber(state.sshPort);
myPrivateKeyPathField.setText(state.sshPrivateKeyPath);
setSshTunnelSetting(settings.getSshTunnelSetting());
}
use of org.jetbrains.idea.svn.SvnConfigurationState in project intellij-community by JetBrains.
the class SshSettingsPanel method apply.
@Override
public void apply(@NotNull SvnConfiguration settings) {
SvnConfigurationState state = settings.getState();
state.sshConnectionType = getConnectionChoice();
state.sshExecutablePath = myExecutablePathField.getText();
state.sshUserName = myUserNameField.getText();
state.sshPort = myPortField.getNumber();
state.sshPrivateKeyPath = myPrivateKeyPathField.getText();
}
Aggregations