Examples of XMappingException


Examples of org.sylfra.idea.plugins.xstructure.resolution.XMappingException

    {
      xpathXMapping.setMatchPattern(Pattern.compile(xMapping.getMatchString()));
    }
    catch (Exception e)
    {
      throw new XMappingException("Failed to compile regexp : " + xMapping.getMatchString());
    }
  }
View Full Code Here

Examples of org.sylfra.idea.plugins.xstructure.resolution.XMappingException

    {
      xPath = new PsiXPath((XmlFile) xmlTag.getContainingFile(), mappingExp.getRawExp());
    }
    catch (JaxenException e)
    {
      throw new XMappingException("Error while parsing resolution expression : <" +
        mappingExp + ">", e);
    }

    try
    {
      return xPath.stringValueOf(xmlTag);
    }
    catch (JaxenException e)
    {
      throw new XMappingException("Error while evaluating value. Mapping expression : <"
        + mappingExp + ">. Xml content : <" + xmlTag.getText() + ">", e);
    }
  }
View Full Code Here

Examples of org.sylfra.idea.plugins.xstructure.resolution.XMappingException

    {
      pattern = Pattern.compile(xMapping.getMatchString());
    }
    catch (Exception e)
    {
      throw new XMappingException("Failed to compile regexp : " + xMapping.getMatchString());
    }
    regexpXMapping.setMatchPattern(pattern);
  }
View Full Code Here

Examples of org.sylfra.idea.plugins.xstructure.resolution.XMappingException

    int startNode = mappingExp.indexOf('/');
    int startAtt = mappingExp.indexOf('@');

    if ((startAtt > -1) && (startAtt < startNode))
    {
      throw new XMappingException("Bad expression, attribute may only be declared on last node : "
        + mappingExp);
    }

    // Related to this tag
    // Text or attribute ?
    if (startNode == -1)
    {
      if (startAtt == 0)
      {
        mappingExp = mappingExp.substring(1);
        XmlAttribute attribute = xmlTag.getAttribute(mappingExp);
        if (attribute == null)
        {
          return "";
        }

        return attribute.getValue();
      }

      if (startAtt > 0)
      {
        throw new XMappingException("Bad expression, attribute should be declared as @att : "
          + mappingExp);
      }
    }

    // This tag text ?
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.