Package org.eclipse.jdt.internal.ui.wizards.buildpaths

Examples of org.eclipse.jdt.internal.ui.wizards.buildpaths.FolderSelectionDialog


          } catch(Exception ex){}
          return false;
        }
    };

    FolderSelectionDialog dialog = new FolderSelectionDialog(
        getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());

    dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectProject"));

    dialog.setInput(wsroot);
    dialog.setValidator(validator);
    dialog.addFilter(filter);
    dialog.setInitialSelection(getProject());
    if (dialog.open() == FolderSelectionDialog.OK) {
      project.setText(((IProject)dialog.getFirstResult()).getName());
    }
  }
View Full Code Here


          rejectedElements.add(allProjects[i]);
        }
      }
      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());

      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());

      dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectFolder"));
      //dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));

      dialog.setInput(wsroot);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == FolderSelectionDialog.OK) {
        parentFolder.setText(((IFolder)dialog.getFirstResult()).getProjectRelativePath().toString());
      }

    } catch (Throwable t) {
      ClickPlugin.log(t);
    }
View Full Code Here

        }
      }

      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());

      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());

      dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectSourceFolder"));
      //dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));

      dialog.setInput(model);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == FolderSelectionDialog.OK) {
        IPackageFragmentRoot root = (IPackageFragmentRoot) dialog.getFirstResult();
        sourceFolder.setText(root.getPath().makeRelativeTo(project.getPath()).toString());
      }

    } catch (Throwable t) {
      ClickPlugin.log(t);
View Full Code Here

          rejectedElements.add(allProjects[i]);
        }
      }
      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
     
      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(),
          new WorkbenchLabelProvider(),
          new WorkbenchContentProvider());
     
      dialog.setTitle(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
      dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
     
      dialog.setInput(wsroot);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == Dialog.OK) {
        textWebAppRoot.setText(getFolderName(dialog.getFirstResult()));
      }
     
    } catch (Throwable t) {
      HTMLPlugin.openAlertDialog(t.toString());
    }
View Full Code Here

          rejectedElements.add(allProjects[i]);
        }
      }
      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
     
      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(),
          new WorkbenchLabelProvider(),
          new WorkbenchContentProvider());
     
      dialog.setTitle(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
      dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
     
      dialog.setInput(wsroot);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == Dialog.OK) {
        textWebAppRoot.setText(getFolderName(dialog.getFirstResult()));
      }
     
    } catch (Throwable t) {
      HTMLPlugin.openAlertDialog(t.toString());
    }
View Full Code Here

          } catch(Exception ex){}
          return false;
        }
    };
   
    FolderSelectionDialog dialog = new FolderSelectionDialog(
        getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
   
    dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectProject"));
   
    dialog.setInput(wsroot);
    dialog.setValidator(validator);
    dialog.addFilter(filter);
    dialog.setInitialSelection(getProject());
    if (dialog.open() == FolderSelectionDialog.OK) {
      project.setText(((IProject)dialog.getFirstResult()).getName());
    }
  }
View Full Code Here

          rejectedElements.add(allProjects[i]);
        }
      }
      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
     
      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
     
      dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectFolder"));
      //dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
     
      dialog.setInput(wsroot);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == FolderSelectionDialog.OK) {
        parentFolder.setText(((IFolder)dialog.getFirstResult()).getProjectRelativePath().toString());
      }
     
    } catch (Throwable t) {
      ClickPlugin.log(t);
    }
View Full Code Here

        }
      }
     
      ViewerFilter filter = new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
     
      FolderSelectionDialog dialog = new FolderSelectionDialog(
          getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
     
      dialog.setTitle(ClickPlugin.getString("wizard.newPage.dialog.selectSourceFolder"));
      //dialog.setMessage(HTMLPlugin.getResourceString("HTMLProjectPropertyPage.WebRoot"));
     
      dialog.setInput(model);
      dialog.setValidator(validator);
      dialog.addFilter(filter);
      dialog.setInitialSelection(init);
      if (dialog.open() == FolderSelectionDialog.OK) {
        sourceFolder.setText(((IPackageFragmentRoot)dialog.getFirstResult()).getElementName());
      }
     
    } catch (Throwable t) {
      ClickPlugin.log(t);
    }
View Full Code Here

    IResource initSelection = null;
//    if (!"".equals(m_outdirPath.getText())) {
//      initSelection= workspaceRoot.findMember(new Path(m_outdirPath.getText()));
//    }

    FolderSelectionDialog dialog = new FolderSelectionDialog(getShell(), lp, cp);
    dialog.setTitle("Select TestNG output artifacts directory");
    dialog.setValidator(validator);
    dialog.setMessage("a message");
    dialog.addFilter(filter);
    dialog.setInput(workspaceRoot);
    dialog.setInitialSelection(initSelection);
    dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));

    if (dialog.open() == Window.OK) {
      m_outputdir.setText(((IContainer) dialog.getFirstResult()).getProjectRelativePath()
                           .toPortableString());
      m_absolutePath.setSelection(false);
    }

  }
View Full Code Here

    ITreeContentProvider cp = new WorkbenchContentProvider();

    Class<?>[] acceptedClasses = new Class[] { IProject.class, IFolder.class };
    ViewerFilter filter = new TypedViewerFilter( acceptedClasses );

    FolderSelectionDialog dialog = new FolderSelectionDialog( parent, lp, cp );
    dialog.setTitle( "Output directory" );
    dialog.setMessage( "Select output directory" );
    dialog.addFilter( filter );
    dialog.setInput( ResourcesPlugin.getWorkspace().getRoot() );
    if ( dialog.open() == Window.OK ) {
      IContainer c = (IContainer) dialog.getFirstResult();
      if ( c.getProject() == ( (IFileEditorInput) getEditorInput() ).getFile().getProject() ) {
        return "${project}/" + c.getProjectRelativePath().toString();
      }
      else {
        return "${workspace}/" + c.getProject().getName() + "/" + c.getProjectRelativePath().toString();
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.ui.wizards.buildpaths.FolderSelectionDialog

Copyright © 2018 www.massapicom. 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.