@Override protected void internalSaveWidgetValues() { super.internalSaveWidgetValues(); IDialogSettings settings = getDialogSettings(); String login = Strings.trimToNull(loginField.getText()); if (settings != null) settings.put(STORE_LOGIN, login); if (saveInSecureStoreButton.getSelection()) saveSecurePassword(login, Strings.emptyToNull(passwordField.getText())); }
public void handleEvent(Event e) { if (validationChange) // Don't act on events that stems from login/password settings made // by the source group validation return; Widget source = e.widget; if (source == saveInSecureStoreButton && saveInSecureStoreButton.getSelection()) { String login = Strings.trimToNull(loginField.getText()); if (login != null) { String password = Strings.emptyToNull(passwordField.getText()); if (password != null) saveSecurePassword(login, password); } } updatePageCompletion(); }