Package org.sylfra.idea.plugins.xstructure.config

Examples of org.sylfra.idea.plugins.xstructure.config.IXMapping


   */
  public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
  {
    IXMappingResolver xMappingResolver = (IXMappingResolver) context.get("xMappingResolver");
    IXMappingSet xMappingSet = (IXMappingSet) context.get("xMappingSet");
    IXMapping xMapping = xMappingResolver.createMapping();

    xMapping.setMappingSet(xMappingSet);

    xMapping.initLabelExp(reader.getAttribute("label"));
    xMapping.initTooltipExp(reader.getAttribute("tip"));
    xMapping.setMatchString(reader.getAttribute("match"));

    String maxLength = reader.getAttribute("maxlength");
    if (maxLength != null)
    {
      xMapping.setMaxLength(Integer.parseInt(maxLength));
    }

    // Icon
    String iconPath = reader.getAttribute("icon");
    if (iconPath != null)
    {
      xMapping.setIcon(resolveIcon(iconPath));
    }

    // Skip mode
    String skipModeValue = reader.getAttribute("skip");
    xMapping.setSkipMode(XMappingFactoryXmlImpl.readSkipMode(skipModeValue));

    try
    {
      xMappingResolver.validateMapping(xMapping);
    }
View Full Code Here


    List<TreeElement> treeElements = new ArrayList<TreeElement>();
    if (xmlTag != null)
    {
      for (XmlTag subTag : xmlTag.getSubTags())
      {
        IXMapping childXMapping = (xMappingSet == null)
          ? null : xMappingSet.getMappingResolver().findMatchingMapping(xMappingSet, subTag);

        IXMapping.SkipMode childSkipMode = findSkipMode(childXMapping);
        switch (childSkipMode)
        {
View Full Code Here

TOP

Related Classes of org.sylfra.idea.plugins.xstructure.config.IXMapping

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.