Package org.eclipse.ui.dialogs

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


            return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a corpus!", null);
          }
        });

        folderSelectionDialog.open();

        Object[] results = folderSelectionDialog.getResult();

        if (results != null) {
          // validator makes sure that one CorpusElement is selected
View Full Code Here


        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a file!", null);
      }
    });

    fileSelectionDialog.open();

    Object[] results = fileSelectionDialog.getResult();

    if (results != null) {
      return ((IFile) results[0]).getFullPath().removeFirstSegments(1).toString();
View Full Code Here

        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a folder!", null);
      }
    });

    folderSelectionDialog.open();

    Object[] results = folderSelectionDialog.getResult();

    if (results.length != 1) {
      return null;
View Full Code Here

        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a folder!", null);
      }
    });

    folderSelectionDialog.open();

    Object[] results = folderSelectionDialog.getResult();

    if (results != null) {
      return ((IFolder) results[0]).getFullPath().removeFirstSegments(1).toString();
View Full Code Here

                return true;
            }
        });
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        // TODO try to preselect the current file
        dialog.open();
        Object[] results = dialog.getResult();
        if ((results != null) && (results.length > 0) && (results[0] instanceof IResource)) {
            IPath path = ((IResource) results[0]).getFullPath();
            setProjectLoc(path.removeFirstSegments(1).makeRelative().toString());
        }
View Full Code Here

                return true;
            }
        });
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        // TODO try to preselect the current file
        dialog.open();
        Object[] results = dialog.getResult();
        if (results != null && results.length > 0 && results[0] instanceof IResource) {
            IPath path = ((IResource) results[0]).getFullPath();
            if (project != null && path.segment(0).equals(project.getProject().getName())) {
                setProjectLoc(path.removeFirstSegments(1).makeRelative().toString());
View Full Code Here

                    dialog.setTitle("choose ivy file");
                    dialog.setMessage("choose the ivy file to use to resolve dependencies");
                    dialog.setInput(project.getProject());
                    dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));

                    if (dialog.open() == Window.OK) {
                        Object[] elements = dialog.getResult();
                        if (elements.length > 0 && elements[0] instanceof IFile) {
                            IPath p = ((IFile) elements[0]).getProjectRelativePath();
                            path = p.toString();
                        }
View Full Code Here

                    }
                } else {
                    FileDialog dialog = new FileDialog(IvyPlugin.getActiveWorkbenchShell(),
                            SWT.OPEN);
                    dialog.setText("Choose an ivy.xml");
                    path = dialog.open();
                }

                if (path != null) {
                    conf.ivyXmlPath = path;
                    ivyFilePathText.setText(path);
View Full Code Here

                dialog.setTitle("JAR File Selection");
                dialog.setMessage("Select one or more JAR files.");
                dialog.addFilter(new FileExtensionFilter("jar")); //$NON-NLS-1$
                dialog.setInput(ResourcesPlugin.getWorkspace());

                if (dialog.open() == Window.OK) {
                    Object[] files = dialog.getResult();
                    List<IPath> added = new ArrayList<IPath>(files.length);
                    for (Object file : files) {
                        added.add(((IResource) file).getFullPath().makeRelative());
                    }
View Full Code Here

            @Override
            public void widgetSelected(SelectionEvent e) {
                FileDialog dialog = new FileDialog(getShell(), SWT.OPEN | SWT.MULTI);
                dialog.setFilterExtensions(new String[] {
                    "*.jar"}); //$NON-NLS-1$
                String res = dialog.open();
                if (res != null) {
                    IPath filterPath = new Path(dialog.getFilterPath());

                    String[] fileNames = dialog.getFileNames();
                    List<IPath> added = new ArrayList<IPath>(fileNames.length);
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.