Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.InputDialog.open()


        if (obj != null) {
          String oldName = ((Podcast) obj).getName();
          InputDialog dialog = new InputDialog(_parent.getShell(),
              Messages.getString("PodcastListView.RenameDialogTitle"), Messages.getString("PodcastListView.RenameDialogQuestion"), oldName, new PodcastNameValidator()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

          int result = dialog.open();

          if (result == InputDialog.OK) {
            ApplicationUtils.closeViewByID(PodcastView.ID, oldName);
            Controller.getInstance().getPlaylistController().renamePodcast(dialog.getValue(), oldName);
          }
View Full Code Here


    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
   
    InputDialog dialog = new InputDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),
        Messages.getString("MenuCopyPlaylistHandler.Title"), Messages.getString("MenuCopyPlaylistHandler.Question"), Messages.getString("MenuCopyPlaylistHandler.DefaultValue"), new PlaylistNameValidator()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    int result = dialog.open();

    if (result == InputDialog.OK) {
     
      ISelection selection = window.getActivePage().getSelection();
     
View Full Code Here

 
  public void run() {
    InputDialog dialog = new InputDialog(_shell,
        Messages.getString("NewPlaylistAction.Title"), Messages.getString("NewPlaylistAction.Question"), _newPlaylist, new PlaylistNameValidator()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    int result = dialog.open();

    if (result == InputDialog.OK) {
      _newPlaylist = dialog.getValue();
      Controller.getInstance().getPlaylistController().addEmptyPlaylist(_newPlaylist);
      Log.getInstance(NewPlaylistHandler.class).debug("New playlist added : " + _newPlaylist); //$NON-NLS-1$
View Full Code Here

  @Override
  protected String getNewInputObject() {
    InputDialog dialog = new InputDialog(getShell(), Messages.getString("RegExPatternListEditor.DialogTitle"), Messages.getString("RegExPatternListEditor.DialogText"), "", new RegexPatternValidator());
   
    if (dialog.open() == InputDialog.OK) {
      return dialog.getValue();
    } else {
      return null;
    }     
  }
View Full Code Here

        Messages.getString("EqualizerView.PresetTitle"), //$NON-NLS-1$
        Messages.getString("EqualizerView.PresetQuestion"), //$NON-NLS-1$
        Messages.getString("EqualizerView.PresetDefaultName"), //$NON-NLS-1$
        new PresetNameValidator()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    int result = dialog.open();

    if (result == InputDialog.OK) {
      Controller.getInstance().getEqualizerController().addPreset(dialog.getValue(),
          valueToDb(scBand0.getSelection()),
              valueToDb(scBand1.getSelection()),
View Full Code Here

    InputDialog descriptionInput = new InputDialog(parent,
        "Sending file to " + user,
        "Please Provide a description of the file (" + f.getName() + ") " +
          "you want to send to " + user,
        "",null);
    if(descriptionInput.open() != InputDialog.OK) return false;
    try {
      outgoingFileTransfer.sendFile(f,descriptionInput.getValue());
     
      final String task = "Sending file " + f.getName() + " to " + user;
      showProgressMonitor(parent, outgoingFileTransfer, task);
View Full Code Here

                  public String isValid(String newText) {
                    return isValidPattern(newText);
                  }
   
                });
            dialog.open();
            if (dialog.getReturnCode() == Window.OK) {
              addItemToList(dialog.getValue(), true);
            }
          }
        });
View Full Code Here

      @Override
      public void widgetSelected(SelectionEvent e) {
        InputDialog input = new InputDialog(getSection().getShell(),
            "Add new custom components package", "Please input packages which includes Tapestry custom components:",
            "", null);
        if (input.open() == Window.OK) {
          String newBundleName = input.getValue().trim();
          List<String> tmp = model.getPackageList();
          if(newBundleName != null && !newBundleName.equals("")&& !tmp.contains(newBundleName)){
            List<String> added = new LinkedList<String>();
            model.addPackageByPath(newBundleName);
View Full Code Here

                message += ":"; //$NON-NLS-1$

                InputDialog dialog = new InputDialog(shell, Messages.RenameContactAction_new_nickname_dialog_title,
                    message, rosterEntry.getName(), null);

                if (dialog.open() == Window.OK) {
                    String newName = dialog.getValue();
                    rosterEntry.setName(newName.length() == 0 ? null : newName);
                }
            }
        });
View Full Code Here

                }
                return null;
              }

            });
        int open = inputDialog.open();
        if (open == Dialog.OK) {
          tv.add(inputDialog.getValue());
        }
        super.widgetSelected(e);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.