Package org.springframework.ide.eclipse.core.model.validation

Examples of org.springframework.ide.eclipse.core.model.validation.IValidator


  public final boolean isEnabled(IStructuredSelection selection) {
    validatorResources = new LinkedHashMap<ValidatorDefinition, Set<IResource>>();
    if (selection.size() > 0) {
      for (ValidatorDefinition validatorDefinition : ValidatorDefinitionFactory
          .getValidatorDefinitions()) {
        IValidator validator = validatorDefinition.getValidator();
        for (Object object : selection.toList()) {
          Set<IResource> resources = validator.deriveResources(object);
          if (resources != null && resources.size() > 0) {
            Set<IResource> valResources = validatorResources.get(validatorDefinition);
            if (valResources == null) {
              valResources = new LinkedHashSet<IResource>();
              validatorResources.put(validatorDefinition, valResources);
View Full Code Here


      public void handleException(Throwable e) {
        // nothing to do - exception is already logged
      }

      public void run() throws Exception {
        IValidator validator = validatorDefinition.getValidator();
        Set<IResource> affectedResources = new LinkedHashSet<IResource>();
        for (IResource resource : resources) {
          affectedResources.addAll(validator.getAffectedResources(resource,
              IncrementalProjectBuilder.INCREMENTAL_BUILD, IResourceDelta.CHANGED));
        }
        validator.validate(affectedResources, IncrementalProjectBuilder.INCREMENTAL_BUILD,
            monitor);
      }
    };
    SafeRunner.run(code);
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.core.model.validation.IValidator

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.