Examples of TypedElementSelectionValidator


Examples of org.eclipse.dltk.internal.ui.wizards.TypedElementSelectionValidator

  }

  @SuppressWarnings("restriction")
  @Override
  public ISelectionStatusValidator getSelectionValidator() {
    return new TypedElementSelectionValidator(new Class[] {IType.class, INamespace.class}, false);
  }
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.wizards.TypedElementSelectionValidator

    if (usedEntries == null) {
      throw new IllegalArgumentException();
    }

    Class[] acceptedClasses = new Class[] { IFile.class };
    TypedElementSelectionValidator validator = new TypedElementSelectionValidator(
        acceptedClasses, true);
    ArrayList usedPhars = new ArrayList(usedEntries.length);
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    for (int i = 0; i < usedEntries.length; i++) {
      IResource resource = root.findMember(usedEntries[i]);
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.wizards.TypedElementSelectionValidator

    if (initialEntry == null || usedEntries == null) {
      throw new IllegalArgumentException();
    }

    Class[] acceptedClasses = new Class[] { IFile.class };
    TypedElementSelectionValidator validator = new TypedElementSelectionValidator(
        acceptedClasses, false);

    ArrayList usedJars = new ArrayList(usedEntries.length);
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    for (int i = 0; i < usedEntries.length; i++) {
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.wizards.TypedElementSelectionValidator

  }

  // ---------- util method ------------
  private IContainer chooseContainer() {
    Class[] acceptedClasses = new Class[] { IProject.class, IFolder.class };
    ISelectionStatusValidator validator = new TypedElementSelectionValidator(
        acceptedClasses, false);
    IProject[] allProjects = fWorkspaceRoot.getProjects();
    ArrayList rejectedElements = new ArrayList(allProjects.length);
    IProject currProject = fCurrScriptProject.getProject();
    for (int i = 0; i < allProjects.length; i++) {
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

        if(!init.exists()){
          init = null;
        }
      }
      Class<?>[] acceptedClasses = new Class<?>[] { IProject.class, IFolder.class };
      ISelectionStatusValidator validator = new TypedElementSelectionValidator(acceptedClasses, false);
      IProject[] allProjects = wsroot.getProjects();
      List<IProject> rejectedElements = new ArrayList<IProject>(allProjects.length);
      for (int i = 0; i < allProjects.length; i++) {
        if (!allProjects[i].equals(currProject)) {
          rejectedElements.add(allProjects[i]);
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

  }

  private void selectSourceFolder() {
    try {
      Class<?>[] acceptedClasses = new Class<?>[] { IJavaModel.class, IJavaProject.class, IPackageFragmentRoot.class };
      ISelectionStatusValidator validator = new TypedElementSelectionValidator(acceptedClasses, false);

      IPackageFragmentRoot init = null;
      IJavaProject project = JavaCore.create(getProject());

      IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

      IResource init = null;
      if (params.getRoot() != null) {
        init = wsroot.findMember(currProject.getName() + params.getRoot());
      }
      Class[] acceptedClasses = new Class[] { IProject.class, IFolder.class };
      ISelectionStatusValidator validator = new TypedElementSelectionValidator(acceptedClasses, false);
      IProject[] allProjects = wsroot.getProjects();
      ArrayList rejectedElements = new ArrayList(allProjects.length);
      for (int i = 0; i < allProjects.length; i++) {
        if (!allProjects[i].equals(currProject)) {
          rejectedElements.add(allProjects[i]);
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

                            new FileTreeContentProvider(false));
            dialog.setAllowMultiple(true);
            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a java class");
            dialog.setInput(rootDirectory);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class}, false));
            if(dialog.open() == Window.OK) {
              IResource rc = (IResource)dialog.getFirstResult();
              return rc.getFullPath()
              .removeFirstSegments(1).toString();
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

                            new FileTreeContentProvider(true));
            dialog.setAllowMultiple(false);
            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a folder");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator

                            new FileTreeContentProvider(true));
            dialog.setAllowMultiple(false);
            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a mutated class");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(2).toString();
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.