Package info.bliki.wiki.tags.util

Examples of info.bliki.wiki.tags.util.WikiTagNode


                break;
              default:

                if (fSource[fCurrentPosition] != '/') {
                  // opening HTML tag
                  WikiTagNode tagNode = parseTag(fCurrentPosition);
                  if (tagNode != null) {
                    String tagName = tagNode.getTagName();
                    TagToken tag = fWikiModel.getTokenMap().get(tagName);
                    if (tag != null) {
                      tag = (TagToken) tag.clone();

                      if (tag instanceof TagNode) {
                        TagNode node = (TagNode) tag;
                        List<NodeAttribute> attributes = tagNode.getAttributesEx();
                        Attribute attr;
                        for (int i = 1; i < attributes.size(); i++) {
                          attr = attributes.get(i);
                          node.addAttribute(attr.getName(), attr.getValue(), true);
                        }
                      }
                      if (tag instanceof HTMLTag) {
                        ((HTMLTag) tag).setTemplate(isTemplate());
                      }

                      createContentToken(fWhiteStart, fWhiteStartPosition, 1);

                      fCurrentPosition = fScannerPosition;

                      String allowedParents = tag.getParents();
                      if (allowedParents != null) {
                        reduceTokenStack(tag);
                      }
                      createTag(tag, tagNode, tagNode.getEndPosition());
                      return TokenIgnore;

                    }
                    break;
                  }
                } else {
                  // closing HTML tag
                  WikiTagNode tagNode = parseTag(++fCurrentPosition);
                  if (tagNode != null) {
                    String tagName = tagNode.getTagName();
                    TagToken tag = fWikiModel.getTokenMap().get(tagName);
                    if (tag != null) {
                      createContentToken(fWhiteStart, fWhiteStartPosition, 2);
                      fCurrentPosition = fScannerPosition;
View Full Code Here


      default:

        if (fSource[fCurrentPosition] != '/') {
          // starting tag
          int lessThanStart = fCurrentPosition - 1;
          WikiTagNode tagNode = parseTag(fCurrentPosition);
          if (tagNode != null) {
            fCurrentPosition = tagNode.getEndPosition();
            int tagStart = fCurrentPosition;
            String tagName = tagNode.getTagName();
            if (tagName.equals("nowiki")) {
              if (readUntilIgnoreCase("</", "nowiki>")) {
                return true;
              }
            } else if (tagName.equals("source")) {
View Full Code Here

        break;
      default:

        if (fSource[fCurrentPosition] != '/') {
          // starting tag
          WikiTagNode tagNode = parseTag(fCurrentPosition);
          if (tagNode != null) {
            fCurrentPosition = tagNode.getEndPosition();
            String tagName = tagNode.getTagName();
            if (tagName.equals("nowiki")) {
              if (readUntilIgnoreCase("</", "nowiki>")) {
                return true;
              }
            } else if (tagName.equals("source")) {
View Full Code Here

        if (fSource[fCurrentPosition] != '/') {
          // starting tag
          int lessThanStart = fCurrentPosition - 1;
          int startPosition = fCurrentPosition;
          int diff = 0;
          WikiTagNode tagNode = parseTag(fCurrentPosition);
          if (tagNode != null && !tagNode.isEmptyXmlTag()) {
            fCurrentPosition = tagNode.getEndPosition();
            int tagStart = fCurrentPosition;
            String tagName = tagNode.getTagName();
            if (tagName.equals("nowiki")) {
              readUntilIgnoreCase("</", "nowiki>");
              return true;
            } else if (tagName.equals("source")) {
              readUntilIgnoreCase("</", "source>");
View Full Code Here

      default:

        if (fSource[fCurrentPosition] != '/') {
          int startPosition = fCurrentPosition;
          // starting tag
          WikiTagNode tagNode = parseTag(fCurrentPosition);
          if (tagNode != null && !tagNode.isEmptyXmlTag()) {
            fCurrentPosition = tagNode.getEndPosition();
            String tagName = tagNode.getTagName();
            if (tagName.equals("nowiki")) {
              readUntilIgnoreCase("</", "nowiki>");
              return true;

            } else if (tagName.equals("source")) {
View Full Code Here

        // this is an error
        return null; // (makeString(start, end));
      }
      // ret = getNodeFactory().createTagNode(this.getPage(), start, end,
      // attributes);
      return new WikiTagNode(start, end, attributes);
    }
    return null;
  }
View Full Code Here

  protected int readSpecialWikiTags(int start) {
    try {
      if (fSource[start] != '/') {
        // starting tag
        WikiTagNode tagNode = parseTag(start);
        if (tagNode != null) {
          String tagName = tagNode.getTagName();
          if (tagName.equals("nowiki")) {
            return readUntilIgnoreCase(fScannerPosition, "</", "nowiki>");
          } else if (tagName.equals("source")) {
            return readUntilIgnoreCase(fScannerPosition, "</", "source>");
          } else if (tagName.equals("math")) {
View Full Code Here

                break;
              default:

                if (fSource[fCurrentPosition] != '/') {
                  // opening HTML tag
                  WikiTagNode tagNode = parseTag(fCurrentPosition);
                  if (tagNode != null) {
                    String tagName = tagNode.getTagName();
                    TagToken tag = fWikiModel.getTokenMap().get(tagName);
                    if ((tag != null) && !(tag instanceof HTMLBlockTag)) {
                      tag = (TagToken) tag.clone();

                      if (tag instanceof TagNode) {
                        TagNode node = (TagNode) tag;
                        List<NodeAttribute> attributes = tagNode.getAttributesEx();
                        Attribute attr;
                        for (int i = 1; i < attributes.size(); i++) {
                          attr = attributes.get(i);
                          node.addAttribute(attr.getName(), attr.getValue(), true);
                        }
                      }
                      if (tag instanceof HTMLTag) {
                        // ((HTMLTag) tag).setTemplate(isTemplate());
                      }

                      createContentToken(1);

                      fCurrentPosition = fScannerPosition;

                      String allowedParents = tag.getParents();
                      if (allowedParents != null) {
                        reduceTokenStack(tag);
                      }
                      createTag(tag, tagNode, tagNode.getEndPosition());
                      return TokenIgnore;

                    }
                    break;
                  }
                } else {
                  // closing HTML tag
                  WikiTagNode tagNode = parseTag(++fCurrentPosition);
                  if (tagNode != null) {
                    String tagName = tagNode.getTagName();
                    TagToken tag = fWikiModel.getTokenMap().get(tagName);
                    if ((tag != null) && !(tag instanceof HTMLBlockTag)) {
                      createContentToken(2);
                      fCurrentPosition = fScannerPosition;
View Full Code Here

      default:

        if (fSource[fCurrentPosition] != '/') {
          // starting tag
          int lessThanStart = fCurrentPosition - 1;
          WikiTagNode tagNode = parseTag(fCurrentPosition);
          if (tagNode != null) {
            fCurrentPosition = tagNode.getEndPosition();
            int tagStart = fCurrentPosition;
            String tagName = tagNode.getTagName();
            if (tagName.equals("nowiki")) {
              if (readUntilIgnoreCase("</", "nowiki>")) {
                return true;
              }
            } else if (tagName.equals("source")) {
View Full Code Here

        // this is an error
        return null; // (makeString(start, end));
      }
      // ret = getNodeFactory().createTagNode(this.getPage(), start, end,
      // attributes);
      return new WikiTagNode(start, end, attributes);
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.tags.util.WikiTagNode

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.