Package org.eclipse.ui.dialogs

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


//    IResource res= currProject.findMember(initialPath);
//    if (res != null) {
//      dialog.setInitialSelection(res);
//    }

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


        dialog.setTitle("Select descriptor");
        dialog.setMessage("Select descriptor");
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setInitialSelection(ResourcesPlugin.getWorkspace().getRoot().
                findMember(typeSystemText.getText()));
        if (dialog.open() == IDialogConstants.OK_ID) {
          IResource resource = (IResource) dialog.getFirstResult();
          if (resource != null) {
            String fileLoc = resource.getFullPath().toString();
            typeSystemText.setText(fileLoc);
          }
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 Cpe descriptor");
        dialog.setMessage("Select Cpe Xml descriptor file");
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        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

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

        folderSelectionDialog.open();

        Object[] results = folderSelectionDialog.getResult();

        if (results != null && results.length > 0) {
          // validator makes sure that an IContainer or an IAdaptable
View Full Code Here

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

                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

    dialog.setTitle(LangUIMessages.mainTab_ProgramPath_searchButton_title);
    dialog.setMessage(LangUIMessages.mainTab_ProgramPath_searchButton_message);
   
    dialog.setInput(project);
    dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
    if (dialog.open() == IDialogConstants.OK_ID) {
      IResource resource = (IResource) dialog.getFirstResult();
      String arg = resource.getProjectRelativePath().toPortableString();
      // check extension
      programPathField.setFieldValue(arg);
    }
View Full Code Here

        return OK_STATUS;
      }
    });
    dialog.setTitle(directorySelection);
    dialog.setMessage(selectWorkspaceDirectory);
    if (dialog.open() != OK) {
      return null;
    }
    IResource resource = (IResource) dialog.getFirstResult();
    return (resource == null) ? null : resource.getFullPath();
  }
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.