Examples of CMNodeList


Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

    {  
      if (e.getOperator() == CMGroup.CHOICE)
      {
        // add only 1 element from the group
        // todo... perhaps add something other than the first one       
        CMNodeList nodeList = e.getChildNodes();
        if (nodeList.getLength() > 0)
        {
          visitCMNode(nodeList.item(0));
        }
      }
      else // SEQUENCE, ALL
      {
        // visit all of the content
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

    {
      separator = " | "; //$NON-NLS-1$
    }
   
  
    CMNodeList nodeList = group.getChildNodes();
    int size = nodeList.getLength();
    for (int i = 0; i < size; i++)
    {
      visitCMNode(nodeList.item(i));
      if (i < size - 1)
      {
        sb.append(separator);
      }
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

        if (!Boolean.TRUE.equals(ed.getProperty("Abstract"))) //$NON-NLS-1$
        {
          addToTable(childNodeTable,ed);
        }

        CMNodeList substitutionGroup = (CMNodeList)ed.getProperty("SubstitutionGroup"); //$NON-NLS-1$
        if (substitutionGroup != null)
        {
          handleSubstitutionGroup(substitutionGroup);
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

        {
          super.visitCMGroup(group);
        }
        else if (op == CMGroup.CHOICE)
        {
          CMNodeList nodeList = group.getChildNodes();
          if (nodeList.getLength() > 0)
          {
            visitCMNode(nodeList.item(0));
          }     
        }
      }
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

      {
        CMValidator.MatchModelNode child = (CMValidator.MatchModelNode)matchModelNode.children.get(0);
        excludeCMNode = child.cmNode;
      }

      CMNodeList nodeList = group.getChildNodes();
      int size = nodeList.getLength();
      for (int i = 0; i < size; i++)
      {
        CMNode alternative = nodeList.item(i);
        if (alternative != excludeCMNode)
        {
          Action action = new Action(ModelQueryAction.REPLACE, parent, alternative, startIndex, endIndex);
          actionList.add(action);
        }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

   * Adds the tag documentation property of the CMNode to the string buffer,
   * sb
   *
   */
  protected void printDocumentation(StringBuffer sb, CMNode node) {
    CMNodeList nodeList = (CMNodeList) node.getProperty("documentation"); //$NON-NLS-1$
    if ((nodeList != null) && (nodeList.getLength() > 0)) {
      for (int i = 0; i < nodeList.getLength(); i++) {
        CMDocumentation documentation = (CMDocumentation) nodeList.item(i);
        String doc = documentation.getValue();
        if (doc != null) {
          sb.append(PARAGRAPH_START + doc.trim() + PARAGRAPH_END);
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

    }
  }

  public void visitCMGroup(CMGroup group)
  {
    CMNodeList nodeList = group.getChildNodes();
    int size = nodeList.getLength();
    for (int i = 0; i < size; i++)
    {
      visitCMNode(nodeList.item(i));
    }
  }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

        // see if this hint corresponds to a valid choice
        //
        CMNode cmNode = null;

        if (hintNode != null) {
          CMNodeList nodeList = e.getChildNodes();
          int nodeListLength = nodeList.getLength();
          for (int j = 0; j < nodeListLength; j++) {
            if (hintNode == nodeList.item(j)) {
              cmNode = hintNode;
            }
          }
        }

        // if no cmNode has been determined from the hint, just use
        // the first choice
        //
        if (cmNode == null) {
          CMNodeList nodeList = e.getChildNodes();
          if (nodeList.getLength() > 0) {
            cmNode = nodeList.item(0);
          }
        }

        if (cmNode != null) {
          // Bug 330260
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

    return result;
  }

  protected CMElementDeclaration getSubstitution(CMElementDeclaration ed) {
    CMElementDeclaration result = ed;
    CMNodeList l = (CMNodeList) ed.getProperty("SubstitutionGroup"); //$NON-NLS-1$
    if (l != null) {
      for (int i = 0; i < l.getLength(); i++) {
        CMNode candidate = l.item(i);
        if (!isAbstract(candidate) && (candidate instanceof CMElementDeclaration)) {
          result = (CMElementDeclaration) candidate;
          break;
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList

  protected void addContent(List contentList, CMContent content) {
    if (content == null) {
      return;
    }
    if (content instanceof CMGroup) {
      CMNodeList children = ((CMGroup) content).getChildNodes();
      if (children == null) {
        return;
      }
      for (int i = 0; i < children.getLength(); i++) {
        CMNode child = children.item(i);
        if (child.getNodeType() == CMNode.ELEMENT_DECLARATION) {
          contentList.add(child);
        }
        else {
          if (child.getNodeType() == CMNode.GROUP) {
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.