Package org.rssowl.ui.internal.dialogs

Examples of org.rssowl.ui.internal.dialogs.ConfirmDialog


          return true;
      }
    }

    /* Create Dialog and open if confirmation required */
    ConfirmDialog dialog = new ConfirmDialog(fShell, Messages.DeleteTypesAction_CONFIRM_DELETE, Messages.DeleteTypesAction_NO_UNDO, getMessage(elements), null);
    return dialog.open() == IDialogConstants.OK_ID;
  }
View Full Code Here


      if (selectedLabels.size() == 1)
        msg = NLS.bind(Messages.ManageLabelsPreferencePage_DELETE_LABEL_N, selectedLabels.get(0).getName());
      else
        msg = NLS.bind(Messages.ManageLabelsPreferencePage_DELETE_N_LABELS, selectedLabels.size());

      ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.ManageLabelsPreferencePage_CONFIRM_DELETE, Messages.ManageLabelsPreferencePage_NO_UNDO, msg, null);
      if (dialog.open() == IDialogConstants.OK_ID) {

        /* Can have an impact on news, thereby force quick update */
        Controller.getDefault().getSavedSearchService().forceQuickUpdate();

        /* Delete Label from DB */
 
View Full Code Here

  }

  private void onResetMasterPassword() {

    /* Ask for Confirmation */
    ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CredentialsPreferencesPage_CONFIRM_RESET, Messages.CredentialsPreferencesPage_NO_UNDO, Messages.CredentialsPreferencesPage_RESET_PASSWORDS, Messages.CredentialsPreferencesPage_RESET_TITLE, null) {
      @Override
      public void setTitle(String newTitle) {
        super.setTitle(Messages.CredentialsPreferencesPage_RESET_TITLE);
      }
    };

    /* Bring Back Security to Default State resetting everything */
    if (dialog.open() == IDialogConstants.OK_ID) {
      ICredentialsProvider provider = Owl.getConnectionService().getCredentialsProvider(URI.create(DUMMY_LINK));
      ((PlatformCredentialsProvider) provider).clear();
      reSetAllCredentials();
      setShowError(false);

View Full Code Here

  }

  private void onRemoveAll() {

    /* Ask for Confirmation first */
    ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CredentialsPreferencesPage_CONFIRM_REMOVE, Messages.CredentialsPreferencesPage_NO_UNDO, Messages.CredentialsPreferencesPage_REMOVE_ALL_CONFIRM, null);
    if (dialog.open() != IDialogConstants.OK_ID)
      return;

    Set<CredentialsModelData> credentials = loadCredentials();
    for (CredentialsModelData data : credentials) {
      remove(data, true);
View Full Code Here

        else
          msg = NLS.bind(Messages.CleanUpWizard_CONFIRM_BOOKMARK, bmCounter);
      } else
        msg = NLS.bind(Messages.CleanUpWizard_CONFIRM_NEWS, newsCounter);

      ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CleanUpWizard_CONFIRM_DELETE, Messages.CleanUpWizard_NO_UNDO, msg, null);
      if (dialog.open() != Window.OK)
        return false;
    }

    /* Restore Editors if Bookmarks are to be deleted */
    if (bmCounter > 0)
View Full Code Here

      if (selectedLabels.size() == 1)
        msg = NLS.bind(Messages.ManageLabelsPreferencePage_DELETE_LABEL_N, selectedLabels.get(0).getName());
      else
        msg = NLS.bind(Messages.ManageLabelsPreferencePage_DELETE_N_LABELS, selectedLabels.size());

      ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.ManageLabelsPreferencePage_CONFIRM_DELETE, Messages.ManageLabelsPreferencePage_NO_UNDO, msg, null);
      if (dialog.open() == IDialogConstants.OK_ID)
        deleteInBackground(selectedLabels);
    }
  }
View Full Code Here

  }

  private void onResetMasterPassword() {

    /* Ask for Confirmation */
    ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CredentialsPreferencesPage_CONFIRM_RESET, Messages.CredentialsPreferencesPage_NO_UNDO, Messages.CredentialsPreferencesPage_RESET_PASSWORDS, Messages.CredentialsPreferencesPage_RESET_TITLE, null) {
      @Override
      public void setTitle(String newTitle) {
        super.setTitle(Messages.CredentialsPreferencesPage_RESET_TITLE);
      }
    };

    /* Bring Back Security to Default State resetting everything */
    if (dialog.open() == IDialogConstants.OK_ID) {
      ICredentialsProvider provider = Owl.getConnectionService().getCredentialsProvider(URI.create(DUMMY_LINK));
      ((PlatformCredentialsProvider) provider).clear();
      reSetAllCredentials();
      setShowError(false);

View Full Code Here

  }

  private void onRemoveAll() {

    /* Ask for Confirmation first */
    ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CredentialsPreferencesPage_CONFIRM_REMOVE, Messages.CredentialsPreferencesPage_NO_UNDO, Messages.CredentialsPreferencesPage_REMOVE_ALL_CONFIRM, null);
    if (dialog.open() != IDialogConstants.OK_ID)
      return;

    Set<CredentialsModelData> credentials = loadCredentials();
    for (CredentialsModelData data : credentials) {
      remove(data, true);
View Full Code Here

      if (smCounter == 1)
        msg.append(NLS.bind(Messages.CleanUpWizard_ONE_SEARCH, StringUtils.replaceAll(smNames.toString(), "&", "&&"))).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      else if (smCounter > 1)
        msg.append(NLS.bind(Messages.CleanUpWizard_N_SEARCHES, smCounter, StringUtils.replaceAll(smNames.toString(), "&", "&&"))).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

      ConfirmDialog dialog = new ConfirmDialog(getShell(), Messages.CleanUpWizard_CONFIRM_DELETE, Messages.CleanUpWizard_NO_UNDO, msg.toString(), null);
      if (dialog.open() != Window.OK)
        return false;
    }

    /* Restore Editors if Bookmarks are to be deleted */
    if (bmCounter > 0)
View Full Code Here

  /*
   * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
   */
  public void run(IAction action) {
    ConfirmDialog dialog = new ConfirmDialog(fWindow.getShell(), Messages.UnsubscribeGoogleReaderAction_0, Messages.UnsubscribeGoogleReaderAction_1, Messages.UnsubscribeGoogleReaderAction_2, Messages.UnsubscribeGoogleReaderAction_3, null) {

      @Override
      protected String getTitleLabel() {
        return Messages.UnsubscribeGoogleReaderAction_4;
      }

      @Override
      protected String getTitleImage() {
        return "/icons/wizban/reader_wiz.png"; //$NON-NLS-1$
      }
    };

    if (dialog.open() == IDialogConstants.OK_ID) {
      try {

        // Stop all pending reloads first to ensure smooth action run
        Controller.getDefault().stopUpdate();

View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.dialogs.ConfirmDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.