Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ElementListSelectionDialog.open()


              dialog.setElements(configList.toArray());
              dialog.setTitle("Choose a Clojure launch configuration")
              dialog.setMessage(LauncherMessages.JavaLaunchShortcut_2);
              dialog.setMultipleSelection(false);
              dialog.setAllowDuplicates(true);
              int result = dialog.open();
              if (result == Window.OK) {
                ret.set((ILaunchConfiguration) dialog.getFirstResult());
              }
          } finally {
            if (labelProvider != null) {
View Full Code Here


          dialog.setTitle(getTitleToolTip());
          dialog.setMessage("Select the baseline to use while generating results:");
          String[] defaultBaseline = new String[] { baselines[baselines.length - 1] };
          dialog.setInitialSelections(defaultBaseline);
          dialog.setElements(baselines);
          dialog.open();
          Object[] selected = dialog.getResult();
          if (selected == null)
            return;
          selectedBaseline = (String) selected[0];
          break;
View Full Code Here

        getShell(), new ModelElementLabelProvider());
    dialog.setTitle(PHPUIMessages.OpenProjectAction_dialog_title);
    dialog.setMessage(PHPUIMessages.OpenProjectAction_dialog_message);
    dialog.setElements(getClosedProjects());
    dialog.setMultipleSelection(true);
    int result = dialog.open();
    if (result != Window.OK)
      return;
    final Object[] projects = dialog.getResult();
    IWorkspaceRunnable runnable = createRunnable(projects);
    try {
View Full Code Here

        shell, new ModelElementLabelProvider(flags));
    dialog.setTitle(title);
    dialog.setMessage(message);
    dialog.setElements(elements);

    if (dialog.open() == Window.OK) {
      return (IModelElement) dialog.getFirstResult();
    }
    return null;
  }
}
View Full Code Here

        shell, new ModelElementLabelProvider(flags));
    dialog.setTitle(title);
    dialog.setMessage(message);
    dialog.setElements(elements);

    if (dialog.open() == Window.OK) {
      Object[] selection = dialog.getResult();
      if (selection != null && selection.length > 0) {
        nResults = selection.length;
        for (int i = 0; i < nResults; i++) {
          Object current = selection[i];
View Full Code Here

  protected ILaunchTarget chooseLaunchable(ILaunchTarget[] launchTargets) {
    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), createLaunchTargetLabelProvider());
    dialog.setElements(launchTargets);
    dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    if (dialog.open() == Window.OK) {
      return (ILaunchTarget) dialog.getResult()[0];
    }
    return null;
  }
 
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
    dialog.setElements(configList.toArray());
    dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunch_title);
    dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunch_message);
    dialog.setMultipleSelection(false);
    int result = dialog.open();
    labelProvider.dispose();
    if (result == Window.OK) {
      return (ILaunchConfiguration) dialog.getFirstResult();
    }
    return null;
View Full Code Here

  protected IResource chooseLaunchable(IResource[] scripts) {
    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new WorkbenchLabelProvider());
    dialog.setElements(scripts);
    dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    if (dialog.open() == Window.OK) {
      return (IResource) dialog.getResult()[0];
    }
    return null;
  }
 
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
    dialog.setElements(configList.toArray());
    dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunch_title);
    dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunch_message);
    dialog.setMultipleSelection(false);
    int result = dialog.open();
    labelProvider.dispose();
    if (result == Window.OK) {
      return (ILaunchConfiguration) dialog.getFirstResult();
    }
    return null;
View Full Code Here

    final IProject project = getProject();
    if (project != null && project.isOpen()) {
      dialog.setInitialSelections(new Object[] { project });
    }
   
    if (dialog.open() == Window.OK) {
      return (IProject) dialog.getFirstResult();
    }
   
    return null;
  }
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.