Package org.eclipse.wst.xml.core.internal.contentmodel

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


   * @param names java.util.Iterator
   */
  public void getDeclarations(CMGroupImpl group, Iterator names) {
    while (names.hasNext()) {
      String entityName = (String) names.next();
      CMNode dec = getNamedItem(entityName);
      if (dec != null)
        group.appendChild(dec);
    }
  }
View Full Code Here


   * @param index int
   */
  public CMNode item(int index) {
    if (!isValidID(index))
      return null;
    CMNode decl = fDecls[index];
    if (decl != null)
      return decl; // already exist.

    decl = create(getName(index));
    fDecls[index] = decl;
View Full Code Here

      TLDCMDocumentManager documentManager = this.fTranslator.getTLDCMDocumentManager();
      if (documentManager != null) {
        List docs = documentManager.getCMDocumentTrackers(prefix, this.fTranslator.getCurrentNode().getStartOffset());
        Iterator it = docs.iterator();
        Iterator elements = null;
        CMNode node = null;
        CMDocument doc = null;
        BlockMarker marker = null;
        while (it.hasNext()) {
          doc = (CMDocument) it.next();
          elements = doc.getElements().iterator();
          while (elements.hasNext()) {
            node = (CMNode) elements.next();
            marker = new BlockMarker(node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true);
            // global scope is OK because we have encountered this
            // <@taglib> directive
            // so it all markers from it should will be in scope
            // add to this local parser
            addBlockMarker(marker);
View Full Code Here

              (Element) node, elementDecl, ModelQuery.INCLUDE_ALL);
          Iterator nodeIterator = additionalElements.iterator();
         
          //check each suggestion
          while (nodeIterator.hasNext()) {
            CMNode additionalElementDecl = (CMNode) nodeIterator.next();
            if (additionalElementDecl != null && additionalElementDecl instanceof CMElementDeclaration &&
                validModelQueryNode(additionalElementDecl)) {
              CMElementDeclaration ed = (CMElementDeclaration) additionalElementDecl;
              // https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
              StringBuffer sb = new StringBuffer();
View Full Code Here

    if (collection == null)
      return;

    // (TR)+
    content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
    CMNode tr = collection.getNamedItem(HTML40Namespace.ElementName.TR);
    if (tr != null)
      content.appendChild(tr);
  }
View Full Code Here

      return;

    // ( )*
    content = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
    // COL
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.COL);
    if (dec != null)
      content.appendChild(dec);
  }
View Full Code Here

    if (collection == null)
      return;
    // ( )*
    content = new CMGroupImpl(CMGroup.SEQUENCE,0, 1);
    //source
    CMNode source = collection.getNamedItem(HTML50Namespace.ElementName.SOURCE);
    if (source != null)
      content.appendChild(source);
  }
View Full Code Here

      return exclusion; // already created.
    if (elementCollection == null)
      return null;

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode a = elementCollection.getNamedItem(HTML40Namespace.ElementName.A);
    if (a != null)
      exclusion.appendChild(a);

    return exclusion;
  }
View Full Code Here

      return exclusion; // already created.
    if (elementCollection == null)
      return null; // fatal

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode form = elementCollection.getNamedItem(HTML40Namespace.ElementName.FORM);
    if (form != null)
      exclusion.appendChild(form);

    return exclusion;
  }
View Full Code Here

      return;

    // ( | )+
    content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
    // OPTGROUP
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTGROUP);
    if (dec != null)
      content.appendChild(dec);
    // OPTION
    dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTION);
    if (dec != null)
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.CMNode

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.