@Override
 protected void okPressed() {
   userData.setUserName(userText.getText().trim());
   userData.setPassword(passwordText.getText().trim());
   userData.setSaveCredentials(saveCredentialsCheckButton.getSelection());
   super.okPressed();
 }
  /**
   * Create contents of the dialog.
   *
   * @param parent
   */
  @Override
  protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    GridLayout gridLayout = (GridLayout) container.getLayout();
    gridLayout.numColumns = 2;

    Label lblLoginToGoogle = new Label(container, SWT.NONE);
    GridData gd_lblLoginToGoogle = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_lblLoginToGoogle.widthHint = 170;
    lblLoginToGoogle.setLayoutData(gd_lblLoginToGoogle);
    lblLoginToGoogle.setText("Login to google");
    new Label(container, SWT.NONE);

    Label lblUser = new Label(container, SWT.NONE);
    lblUser.setText("User:"******"Enter your google username");
    userText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    if (userData.isSaveCredentials() && userData.getUserName() != null) {
      userText.setText(userData.getUserName());
    }

    Label lblPassword = new Label(container, SWT.NONE);
    lblPassword.setText("Password:"******"Enter your google password");
    passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    if (userData.isSaveCredentials() && userData.getPassword() != null) {
      passwordText.setText(userData.getPassword());
    }

    saveCredentialsCheckButton = new Button(container, SWT.CHECK);
    saveCredentialsCheckButton.setText("Save username and password");
    saveCredentialsCheckButton.setSelection(userData.isSaveCredentials());
    new Label(container, SWT.NONE);

    return container;
  }
 public String getUser() {
   return userData.getUserName();
 }
 public String getPassword() {
   return userData.getPassword();
 }