Package org.eclipse.ui.dialogs

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


                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) {
                ivyFilePathText.setText(path);
                ivyXmlPathUpdated();
View Full Code Here

        dialog.setTitle("Select input folder");
        dialog.setMessage("Select input folder");

        dialog.setInput(getProject().getProject());
        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

                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle(LaunchConfigurationsMessages.CommonTab_13);
        dialog.setMessage(LaunchConfigurationsMessages.CommonTab_14);
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
        if (dialog.open() == IDialogConstants.OK_ID) {
          IResource resource = (IResource) dialog.getFirstResult();
          String arg = resource.getFullPath().toString();
          String fileLoc = VariablesPlugin.getDefault().getStringVariableManager()
                  .generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
          fFileText.setText(fileLoc);
View Full Code Here

    fFileBrowse.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        String filePath = fFileText.getText();
        FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
        filePath = dialog.open();
        if (filePath != null) {
          fFileText.setText(filePath);
        }
      }
    });
View Full Code Here

    });
    fVariables = createPushButton(standardGroup, LaunchConfigurationsMessages.CommonTab_9, null);
    fVariables.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
        dialog.open();
        String variable = dialog.getVariableExpression();
        if (variable != null) {
          fFileText.insert(variable);
        }
      }
View Full Code Here

              return ngStatus;
            }
            return okStatus;
          }
        });
        if (dialog.open() == Dialog.OK) {
          Object[] results = dialog.getResult();
          for(int i=0;i<results.length;i++){
            tableModel.add((IFile)results[i]);
          }
          tableViewer.refresh();
View Full Code Here

    addExternal.setLayoutData(createButtonGridData());
    addExternal.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(SelectionEvent evt){
        FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN|SWT.MULTI);
        dialog.setFilterExtensions(new String[]{"*.js"});
        String result = dialog.open();
        if(result!=null){
          String dir = dialog.getFilterPath();
          String[] fileNames = dialog.getFileNames();
          for(int i=0;i<fileNames.length;i++){
            tableModel.add(new File(dir, fileNames[i]));
View Full Code Here

      }
    });
    dialog.setAllowMultiple(false);
    dialog.setTitle(HTMLPlugin.getResourceString("Launcher.JavaScript.Dialog.SelectFile"));
   
    if (dialog.open() == Dialog.OK) {
      IFile file = (IFile) dialog.getFirstResult();
      return file.getLocation().toString();
    }
   
    return null;
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.