Package org.eclipse.ui.dialogs

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


    IPackageFragment pack = getPackageFragment();
    if (pack != null) {
      dialog.setInitialSelections(new Object[] { pack});
    }

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


            dialog.setMessage("Choose a launch configuration to debug");
        } else {
            dialog.setMessage("Choose a launch configuration to run");
        }
        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() == ElementListSelectionDialog.OK) { return (IJavaProject) dialog.getFirstResult(); }
        return null;
    }

    /**
     * @return Java project corresponding to the project name in the project
View Full Code Here

        dialog.setMessage("Select a project to constrain your search.");

        List<IProject> projects = loadProjects();
        dialog.setElements(projects.toArray(new IProject[projects.size()]));

        if (Window.OK == dialog.open()) {
            IProject selected = (IProject) dialog.getFirstResult();
            launchTargetTxt.setText(selected.getName());
        }
    }
View Full Code Here

            dialog.setInitialSelections(new Object[] {
                pack
            });
        }

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

      String perlFile = fMainText.getText();
      if (perlFile != null) {
        dialog.setInitialSelections(new Object[] { perlFile });
      }
      if (dialog.open() == ElementListSelectionDialog.OK) {
        fMainText.setText((String) dialog.getFirstResult());
      }
    }
  }
View Full Code Here

                dialog.setTitle(TITLE);
                dialog.setMessage(DESCRIPTION);
                dialog.setElements(selectionOptions.toArray());


                if (dialog.open() != Window.OK) {  
                  if (dialog.getReturnCode() == Window.CANCEL){
                    CloudFoundryPlugin.logWarning("User pressed cancel on selection dialog"); //$NON-NLS-1$
                    return null;
                  }
                  CloudFoundryPlugin.logError(("Failed to open the Open Home Page selection dialog")); //$NON-NLS-1$
View Full Code Here

              Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
             
              ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new TypeLabelProvider());
              dialog.setElements(types);
             
              if (dialog.open() == Window.OK) {
               
                Object[] result = dialog.getResult();
               
                if (result != null && result.length == 1) {
                  this.type = (IType) result[0];
View Full Code Here

    if (javaProjects != null) {
      dialog.setElements(javaProjects);
    }

    if (dialog.open() == Window.OK) {
      IJavaProject project = (IJavaProject) dialog.getFirstResult();
      projectText.setText(project.getElementName());
      setTabDirty();
    }
  }
View Full Code Here

        resDialog.setElements(dir.listFiles());
        resDialog.setTitle("Restoring results");
        resDialog.setMessage("Select results to restore");

        resDialog.open();

        if (resDialog.getReturnCode() != Window.OK) {
            return;
        }
        //
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.