Package org.eclipse.jface.text.templates

Examples of org.eclipse.jface.text.templates.TemplateContextType.validate()


      String text= document.get();
      fValidationStatus.setOK();
      TemplateContextType contextType= fContextTypeRegistry.getContextType(getContextId());
      if (contextType != null) {
        try {
          contextType.validate(text);
        } catch (TemplateException e) {
          fValidationStatus.setError(e.getLocalizedMessage());
        }
      }
View Full Code Here


        pattern = pattern.replace("\r", "");
        pattern = pattern.replace("\n", eol);
        template.setPattern(pattern);
       
        try {
          contextType.validate(template.getPattern());
        } catch (TemplateException e) {
          continue;
        }     
       
        if (template.matches(prefix, contextType.getId()) && template.getName().startsWith(prefix)){
View Full Code Here

      String text= document.get();
      fValidationStatus.setOK();
      TemplateContextType contextType= fContextTypeRegistry.getContextType(getContextId());
      if (contextType != null) {
        try {
          contextType.validate(text);
        } catch (TemplateException e) {
          fValidationStatus.setError(e.getLocalizedMessage());
        }
      }
View Full Code Here

    fValidationStatus.setOK();
    TemplateContextType contextType = fContextTypeRegistry
        .getContextType(getContextId());
    if (contextType != null) {
      try {
        contextType.validate(text);
      } catch (TemplateException e) {
        fValidationStatus.setError(e.getLocalizedMessage());
      }
    }
View Full Code Here

        .getContextTypeId());
    if (type == null) {
      return PhpTemplateMessages.TemplateSet_3 + template.getContextTypeId();
    }
    try {
      type.validate(template.getPattern());
      return null;
    } catch (TemplateException e) {
      return e.getMessage();
    }
  }
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.