Example #1
0
        private void setNewNodeUsing()
        {
            Boolean         foundNewNode    = false;
            List <NodeTree> childsNodeUsing = nodeUsing.getChilds();

            foreach (NodeTree node in childsNodeUsing)
            {
                String          name        = node.getName();
                List <NodeTree> childsNodes = node.getChilds();
                if (namesNoTerminal.Contains(name) && childsNodes.Count == 0)
                {
                    this.nodeUsing = node;
                    foundNewNode   = true;
                    break;
                }
            }
            if (foundNewNode == false)
            {
                NodeTree nodeParent = nodeUsing.getNodeParent();
                if (nodeParent != null)
                {
                    nodeUsing = nodeParent;
                    setNewNodeUsing();
                }
            }
        }