Package org.eclipse.ui.dialogs

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


            boolean isIDE = CommonUIUtils.isIDEEnvironment();
            if ( isIDE )
            {
                // Opening a dialog for file selection
                ElementTreeSelectionDialog dialog = createWorkspaceFileSelectionDialog();
                if ( dialog.open() == Dialog.OK )
                {
                    // Getting the input stream for the selected file
                    Object firstResult = dialog.getFirstResult();
                    if ( ( firstResult != null ) && ( firstResult instanceof IFile ) )
                    {
View Full Code Here


            {
                // Opening a dialog for file selection
                FileDialog dialog = new FileDialog( editor.getSite().getShell(), SWT.OPEN | SWT.SINGLE );
                dialog.setText( DIALOG_TITLE );
                dialog.setFilterPath( System.getProperty( "user.home" ) ); //$NON-NLS-1$
                String filePath = dialog.open();
                if ( filePath == null )
                {
                    // Cancel button has been clicked
                    return;
                }
View Full Code Here

    );

    MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, IJavaDebugUIConstants.INTERNAL_ERROR,
        "One or more exceptions occurred while adding projects.", null)//$NON-NLS-1$

    if (dialog.open() == Window.OK) {
      Object[] selections = dialog.getResult();

      List<IFolder> additions = new ArrayList<IFolder>(selections.length);
      for (int i = 0; i < selections.length; i++) {
        IFolder jp = (IFolder)selections[i];
View Full Code Here

    );

    MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, IJavaDebugUIConstants.INTERNAL_ERROR,
        "One or more exceptions occurred while adding projects.", null)//$NON-NLS-1$

    if (dialog.open() == Window.OK) {
      Object[] selections = dialog.getResult();

      List<IFolder> additions = new ArrayList<IFolder>(selections.length);
      for (int i = 0; i < selections.length; i++) {
        IFolder jp = (IFolder)selections[i];
View Full Code Here

      selectionDialog.setInput(m_rootJavaInfo);
      // set initial selection
      selectionDialog.setInitialSelection(property.getValue());
    }
    // open dialog
    if (selectionDialog.open() == Window.OK) {
      ImageBundlePrototypeDescription prototype =
          (ImageBundlePrototypeDescription) selectionDialog.getFirstResult();
      property.setValue(prototype);
    }
  }
View Full Code Here

                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle(dialogTitle);
        dialog.setMessage(dialogMessage);
        dialog.setInput(root);
        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
        int buttonId = dialog.open();
        if (buttonId == IDialogConstants.OK_ID) {
            resource = (IResource) dialog.getFirstResult();
            if (!resource.isAccessible()) {
                return null;
            }
View Full Code Here

                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle("Select UIMA descriptor");
        dialog.setMessage("Select UIMA Xml descriptor file");
        dialog.setInput(root);
        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
        int buttonId = dialog.open();
        if (buttonId == IDialogConstants.OK_ID) {
            resource = (IResource) dialog.getFirstResult();
            if (!resource.isAccessible()) {
                return null;
            }
View Full Code Here

      resource = vertex.getParent().getFile().getParent();
    }
    tree.setInitialSelection(resource);

    // opens the dialog
    if (tree.open() == Window.OK) {
      IFile file = (IFile) tree.getFirstResult();
      if (file != null) {
        return getRefinementValue(vertex, file);
      }
    }
View Full Code Here

                dialog.setMessage("choose the ivy file to use to resolve dependencies");
                dialog.setInput(project.getProject());
                // deprecated use as of 3.3 but we need to say compatible with 3.2
                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) {
                ivyFilePathText.setText(path);
                ivyXmlPathUpdated();
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.