Package org.cfeclipse.cfml.parser.docitems

Examples of org.cfeclipse.cfml.parser.docitems.DocItem.addChild()


         parseMessages.addMessage(new ParseMessage(newItem.getLineNumber(), newItem.getStartPosition(), newItem.getEndPosition(), newItem.getItemData(),
         "<cfelseif> after <cfelse>"));
        addOkay = false;
      }
      else if((lastIsElseIf || lastIsElse) && !(itemIsElse || itemIsElseIf) )  // Is the previous item an else/elseif and the current item isn't one?    
        mostRecentItem.addChild(newItem);  
      else
        addOkay = addOkay & super.addChild(newItem)// No elses if elseifs, so we add it to the if's children.
    }
    else
      addOkay = addOkay & super.addChild(newItem);
View Full Code Here


                  TagItem item = (TagItem)items[i];
                  //System.out.println(item.getChildNodes().size() + " children need to be moved to " + parent.getName());
                  Object[] orphans = item.getChildNodes().toArray();
                  if (item instanceof CfmlCustomTag) {
                    ((CfmlCustomTag)item).hasCloser = false;
                    parent.addChild(item);
                    item.setParent(parent);
                  }
                  for (int j=0;j<orphans.length;j++) {
                      DocItem orphan = (DocItem)orphans[j];
                      //System.out.println("Moving " + orphan.getName() + " under " + parent.getName());
View Full Code Here

      if(topItem.getName().compareToIgnoreCase(closerName) == 0)
      {
          //System.out.println("Found matcher at top of stack!!!");
        DocItem parentItem = (DocItem)matchStack.pop();
        try {
          parentItem.addChild(topItem);
        }
        catch(Exception excep)
        {
          //
          // Tell the user there was a problem and then rethrow the exception.
View Full Code Here

    addTagItemToTree(match, matchStack, isACloser, newItem);
  }

  private void addDocItemToTree(DocItem item) {
    DocItem topItem = (DocItem) matchStack.pop();
    topItem.addChild(item);
    matchStack.push(topItem);
  }

  private void addDocItemToTree(ParseItemMatch match, DocItem newItem)
  {
View Full Code Here

      }
      else
      {   // It's a closing item, so we get the parent item and add this item to it's children.
        DocItem top = (DocItem)matchStack.pop();

        top.addChild(newItem);
        matchStack.push(top);
     
    } catch(Exception anExcep) {
      parserState.addMessage(new ParseError(getLineNumber(match.startPos), match.startPos, match.endPos, match.match, "An unknown error occurred during parsing."));
      System.err.println("CFParser::handleCFTag() - Caught an exception during item popping. Exception was " + anExcep.getLocalizedMessage());
View Full Code Here

            if (parent == null) {
              parent = defaultParent;
            }
            // Don't make the thing a child of itself.
            if (!parent.equals(t)) {
              parent.addChild(t);
 
              CFNodeList childNodes = t.getChildNodes();
              Iterator iter = childNodes.iterator();
              ArrayList deletedChildren = new ArrayList();
              while (iter.hasNext()) {
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.