use of org.archicontribs.modelrepository.authentication.SimpleCredentialsStorage in project archi-modelrepository-plugin by archi-contribs.
the class ModelRepositoryPreferencePage method setValues.
private void setValues() {
PersonIdent result = getUserDetails();
fUserNameTextField.setText(result.getName());
fUserEmailTextField.setText(result.getEmailAddress());
fUserRepoFolderTextField.setText(getPreferenceStore().getString(PREFS_REPOSITORY_FOLDER));
fStoreCredentialsButton.setSelection(getPreferenceStore().getBoolean(PREFS_STORE_REPO_CREDENTIALS));
fUseProxyButton.setSelection(getPreferenceStore().getBoolean(PREFS_PROXY_USE));
fProxyHostTextField.setText(getPreferenceStore().getString(PREFS_PROXY_HOST));
fProxyPortTextField.setText(getPreferenceStore().getString(PREFS_PROXY_PORT));
fRequiresProxyAuthenticationButton.setSelection(getPreferenceStore().getBoolean(PREFS_PROXY_REQUIRES_AUTHENTICATION));
try {
SimpleCredentialsStorage sc = new SimpleCredentialsStorage(new File(ModelRepositoryPlugin.INSTANCE.getUserModelRepositoryFolder(), IGraficoConstants.PROXY_CREDENTIALS_FILE));
fProxyUserNameTextField.setText(StringUtils.safeString(sc.getUsername()));
fProxyUserPasswordTextField.setText(StringUtils.safeString(sc.getPassword()));
} catch (IOException ex) {
ex.printStackTrace();
}
updateProxyControls();
}
Aggregations