Examples of replaceChild()


Examples of com.google.caja.parser.MutableParseTreeNode.replaceChild()

            String ident = ssp.suffixedIdentifier(gadgetNameSuffix);
            replacement = ".".equals(ssp.typePrefix())
                ? new CssTree.ClassLiteral(ssp.getFilePosition(), "." + ident)
                : new CssTree.IdLiteral(ssp.getFilePosition(), "#" + ident);
          }
          parent.replaceChild(replacement, ssp);
          return false;
        } else if (node instanceof CssTree.IdLiteral) {
          // An un-suffixed ID literal has snuck in since CssRewriter.
          throw new AssertionError();
        } else {
View Full Code Here

Examples of com.google.caja.parser.css.CssTree.replaceChild()

                } else {
                  replacement = new UnsafeUriLiteral(
                          content.getFilePosition(), uri);
                }
                replacement.getAttributes().putAll(content.getAttributes());
                term.replaceChild(replacement, content);
              } catch (URISyntaxException ex) {
                // Should've been checked in removeUnsafeConstructs.
                throw new SomethingWidgyHappenedError(ex);
              }
            }
View Full Code Here

Examples of com.google.caja.parser.js.Block.replaceChild()

        md = (MultiDeclaration) first;
      } else if (first instanceof Declaration) {
        md = new MultiDeclaration(
            FilePosition.span(pos, first.getFilePosition()),
            Collections.singletonList((Declaration) first));
        body.replaceChild(md, first);
      } else if (decls.size() == 1) {
        body.insertBefore(decls.get(0), first);
        return;
      } else {
        md = new MultiDeclaration(pos, Collections.<Declaration>emptyList());
View Full Code Here

Examples of com.google.caja.parser.js.Reference.replaceChild()

              Reference r = (Reference) node;
              if (Keyword.THIS.toString().equals(r.getIdentifierName())) {
                Identifier oldRef = r.getIdentifier();
                Identifier thisNode = new Identifier(
                    oldRef.getFilePosition(), ReservedNames.THIS_NODE);
                r.replaceChild(SyntheticNodes.s(thisNode), oldRef);
              }
              return false;
            }
            return true;
          }
View Full Code Here

Examples of com.google.gwt.dom.client.Element.replaceChild()

            field.getElement().appendChild(element.getFirstChildElement());
          }
          firstNode = element.getFirstChild();
        }
      }
      parentElement.replaceChild(field.getElement(), element);

      /*
       * Preserve template Element attributes.
       */
      final JsArray<Node> templateAttributes = getAttributes(element);
View Full Code Here

Examples of com.google.gwt.dom.client.Element.replaceChild()

            field.getElement().appendChild(element.getFirstChildElement());
          }
          firstNode = element.getFirstChild();
        }
      }
      parentElement.replaceChild(field.getElement(), element);

      boolean hasI18nKey = !field.getElement().getAttribute("data-i18n-key").equals("");
      boolean hasI18nPrefix = !field.getElement().getAttribute("data-i18n-prefix").equals("");
     
      /*
 
View Full Code Here

Examples of com.google.gwt.dom.client.TableElement.replaceChild()

    private void replaceTableSection(AbstractCellTable<?> table, TableSectionElement section,
        SafeHtml html) {
      String sectionName = section.getTagName().toLowerCase();
      TableSectionElement newSection = convertToSectionElement(table, sectionName, html);
      TableElement tableElement = table.getElement().cast();
      tableElement.replaceChild(newSection, section);
      if ("tbody".equals(sectionName)) {
        ((TableSectionChangeHandler) table).onTableBodyChange(newSection);
      } else if ("thead".equals(sectionName)) {
        ((TableSectionChangeHandler) table).onTableHeadChange(newSection);
      } else if ("tfoot".equals(sectionName)) {
View Full Code Here

Examples of com.google.gwt.dom.client.TableRowElement.replaceChild()

                CellValue< ? extends Comparable< ? >> cell = rowData.get( index );
                Coordinate hc = cell.getHtmlCoordinate();

                TableRowElement tre = tbody.getRows().getItem( hc.getRow() );
                TableCellElement ntce = tre.insertCell( hc.getCol() );
                tre.replaceChild( tce,
                                  ntce );
            }
        }
    }
View Full Code Here

Examples of com.google.javascript.rhino.Node.replaceChild()

      if (member.isMemberDef() && member.getString().equals("constructor")) {
        ctorJSDocInfo = member.getJSDocInfo();
        constructor = member.getFirstChild().detachFromParent();
        if (!anonymous) {
          constructor.replaceChild(
              constructor.getFirstChild(), className.cloneNode());
        }
      } else {
        Node qualifiedMemberName;
        Node method;
View Full Code Here

Examples of com.google.javascript.rhino.Node.replaceChild()

    Preconditions.checkNotNull(injectionPointParent);
    Preconditions.checkState(NodeUtil.isStatementBlock(injectionPointParent));

    // Replace the expression with a reference to the new name.
    Node expressionParent = expression.getParent();
    expressionParent.replaceChild(
        expression, IR.name(resultName));

    // Re-add the expression at the appropriate place.
    Node newExpressionRoot = NodeUtil.newVarNode(resultName, expression);
    injectionPointParent.addChildBefore(newExpressionRoot, injectionPoint);
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.