Examples of TypedElementSelectionValidator


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

  }
 
  private IPackageFragmentRoot choosePackageRoot() {
    IJavaElement initElement= clazz.getFragmentRoot();
    Class<?>[] acceptedClasses= new Class<?>[] { IPackageFragmentRoot.class, IJavaProject.class };
    TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false) {
      public boolean isSelectedValid(Object element) {
        try {
          if (element instanceof IJavaProject) {
            IJavaProject jproject= (IJavaProject)element;
            IPath path= jproject.getProject().getFullPath();
View Full Code Here

Examples of org.erlide.ui.util.TypedElementSelectionValidator

        final FolderSelectionDialog dialog = new FolderSelectionDialog(shell, lp, cp);
        dialog.setTitle(dialogTitle);

        final ISelectionStatusValidator validator = new ISelectionStatusValidator() {
            ISelectionStatusValidator myValidator = new TypedElementSelectionValidator(
                    acceptedClasses, false);

            @Override
            public IStatus validate(final Object[] selection) {
                final IStatus typedStatus = myValidator.validate(selection);
                if (!typedStatus.isOK()) {
                    return typedStatus;
                }
                if (selection[0] instanceof IFolder) {
                    // try {
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.