Package org.eclipse.ui.dialogs

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


                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle("Select input folder or file");
        dialog.setMessage("Select input folder or file");
        dialog.setInput(getSelectedProject());
        dialog.setInitialSelection(getWorkspaceRoot().findMember(inputText.getText()));
        if (dialog.open() == IDialogConstants.OK_ID) {
          IResource resource = (IResource) dialog.getFirstResult();
          if (resource != null) {
            String fileLoc = resource.getFullPath().toString();
            inputText.setText(fileLoc);
          }
View Full Code Here


        String currentContainerString = outputFolderText.getText();
        IContainer currentContainer = getContainer(currentContainerString);
        ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
                currentContainer, false, "Select output folder");
        dialog.showClosedProjects(false);
        dialog.open();
        Object[] results = dialog.getResult();
        if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
          IPath path = (IPath) results[0];
          String containerName = path.toOSString();
          outputFolderText.setText(containerName);
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

   
    IJavaProject javaProject = getJavaProject();
    if (javaProject != null) {
      dialog.setInitialSelections(new Object[] { javaProject });
    }
    if (dialog.open() == Window.OK) {     
      return (IJavaProject) dialog.getFirstResult();
    }     
    return null;   
  }
 
View Full Code Here

      dialog.setMessage("Select JBehave debug configuration");
    } else {
      dialog.setMessage("Select JBehave run configuration");
    }
    dialog.setMultipleSelection(false);
    int result= dialog.open();
    labelProvider.dispose();
    if (result == Window.OK) {
      return (ILaunchConfiguration)dialog.getFirstResult();
    }
    throw new LaunchCancelledByUserException();
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(_shell, new LabelProvider());
    dialog.setTitle(Messages.getString("EqualizerView.PresetSelectTitle")); //$NON-NLS-1$
    dialog.setMessage(Messages.getString("EqualizerView.PresetSelectMessage")); //$NON-NLS-1$
    dialog.setMultipleSelection(false);
    dialog.setElements(Controller.getInstance().getEqualizerController().getPresetsList());
    int result = dialog.open();
   
    if (result == Dialog.OK) {
      return (String) dialog.getFirstResult();
    } else {
      return null;
View Full Code Here

    for (int i = 0; i < perspectiveArray.length; i++) {
      perspectiveList.add(perspectiveArray[i].getLabel());
    }   
    dialog.setElements(perspectiveList.toArray());
   
    int result = dialog.open();
   
    if (result == Dialog.OK) {
      return (String) dialog.getFirstResult();
    } else {
      return null;
View Full Code Here

      dialog.setMessage("Debug...");
    } else {
      dialog.setMessage("Run...");
    }
    dialog.setMultipleSelection(false);
    int result = dialog.open();
    labelProvider.dispose();
    if (result == Window.OK) {
      return (ILaunchConfiguration) dialog.getFirstResult();
    }
    return null;
View Full Code Here

        ElementListSelectionDialog dialog = new ElementListSelectionDialog(new Shell(), new GwtLabelProvider());
        dialog.setMultipleSelection(false);
        dialog.setTitle("Module Selection");
        dialog.setMessage("Select the module to launch:");
        dialog.setElements(modules.toArray());
        dialog.open();
        moduleFile = (IFile) dialog.getFirstResult();
      }
    } catch (CoreException e) {
      Activator.logException(e);
      ErrorDialog.openError(new Shell(), "Error launching", "An exception occured while launching GWT Hosted mode", e.getStatus());
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.