if (!command.foundError() && (command.getServer() != null)) {
servers.add(command.getServer());
try {
MksConfiguration configuration = ApplicationManager.getApplication().getComponent(MksConfiguration.class);
configuration.addRememberedUsername(hostAndPort, userAndPassword.user);
passwordSafe.storePassword(myProject, MksVcs.class, createPasswordKey(hostAndPort, userAndPassword.user),userAndPassword.password);
} catch (PasswordSafeException e) {
reportErrors(Arrays.asList(new VcsException(e)), "unable to store credentials");
}
} else {
reportErrors(command.errors, "unable to connect to " + hostAndPort);