Search in sources :

Example 1 with SvnConfigurationState

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;
}
Also used : GeneralCommandLine(com.intellij.execution.configurations.GeneralCommandLine) SvnConfigurationState(org.jetbrains.idea.svn.SvnConfigurationState) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with SvnConfigurationState

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());
}
Also used : SvnConfigurationState(org.jetbrains.idea.svn.SvnConfigurationState)

Example 3 with SvnConfigurationState

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();
}
Also used : SvnConfigurationState(org.jetbrains.idea.svn.SvnConfigurationState)

Aggregations

SvnConfigurationState (org.jetbrains.idea.svn.SvnConfigurationState)3 GeneralCommandLine (com.intellij.execution.configurations.GeneralCommandLine)1 NotNull (org.jetbrains.annotations.NotNull)1