Examples of CMGroup


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

    StringBuffer info = new StringBuffer(" "); //$NON-NLS-1$
    if ((parent != null) && (parent.getNodeType() == Node.ELEMENT_NODE)) {
      CMElementDeclaration decl = fModelUtil.getModelQuery().getCMElementDeclaration((Element) parent);
      CMContent content = decl.getContent();
      if (content instanceof CMGroup) {
        CMGroup cmGroup = (CMGroup) content;
        CMNodeList children = cmGroup.getChildNodes();
        CMNode cmNode = null;
        for (int i = 0; i < children.getLength(); i++) {
          cmNode = children.item(i);
          contextString = cmNode.getNodeName();
          if (contextString != null) {
View Full Code Here

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

  {      
    boolean result = false;
    CMNode cmNode = ed.getContent();
    if (cmNode != null && cmNode.getNodeType() == CMNode.GROUP)
    {
      CMGroup cmGroup = (CMGroup)cmNode;
      if (cmGroup.getOperator() == CMGroup.CHOICE && cmGroup.getMaxOccur() == -1)
      {                  
        result = true;
        CMNodeList list = cmGroup.getChildNodes();
        for (int i = list.getLength() - 1; i >= 0; i--)
        {
          if (list.item(i).getNodeType() != CMNode.ELEMENT_DECLARATION)
          {
            result = false;
View Full Code Here

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

          // explicitly handle 'All' groups
          //
          CMContent content = ed.getContent();
          if (content != null && content.getNodeType() == CMNode.GROUP)
          {
            CMGroup group = (CMGroup)content;
            if (group.getOperator() == CMGroup.ALL)
            {
              isGraphValidationNeeded = false;
              validatAllGroupContent(elementContent, comparator, group, result);                              
            }             
          } 
View Full Code Here

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

      if (matchModelNode.cmNode != null)
      {
        int nodeType = matchModelNode.cmNode.getNodeType();
        if (nodeType == CMNode.GROUP)
        {
          CMGroup group = (CMGroup)matchModelNode.cmNode;
          if (group.getOperator() == CMGroup.CHOICE)
          {
            addReplaceActions(matchModelNode, group, startIndex, elementIndex - 1);
          }
        }
        else if (nodeType == CMNode.ELEMENT_DECLARATION)
View Full Code Here

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

          visitCMElementDeclaration((CMElementDeclaration)node);
          break;
        }
        case CMNode.GROUP :
        {
          CMGroup group = (CMGroup)node;
         
          // This is to prevent recursion.
          if (visitedCMGroupStack.contains(group))
          {
            break;
View Full Code Here

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

    int min = Math.max(ed.getMinOccur(), forcedMin);

    // Correct the min value if the element is contained in
    // a group.
    if (!cmGroupStack.isEmpty()) {
      CMGroup group = (CMGroup) cmGroupStack.peek();
      int gmin = group.getMinOccur();
      if (gmin == 0)
        if (buildOptionalElements(buildPolicy)) {
          /* do nothing: min = min */
        }
        else {
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.