Package org.fusesource.ide.camel.editor.validation

Examples of org.fusesource.ide.camel.editor.validation.ValidationResult


    IFeatureProvider featureProvider = getFeatureProvider();
    Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
    if (bo instanceof AbstractNode) {
      AbstractNode node = (AbstractNode) bo;

      ValidationResult res = ValidationFactory.getInstance().validate(node);
      if (res.getInformationCount() > 0) {
        for (String message : res.getInformations()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_INFORMATION_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
      if (res.getWarningCount() > 0) {
        for (String message : res.getWarnings()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_WARNING_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
      if (res.getErrorCount() > 0) {
        for (String message : res.getErrors()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_ERROR_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.camel.editor.validation.ValidationResult

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.