Package org.eclipse.jst.pagedesigner.converter

Examples of org.eclipse.jst.pagedesigner.converter.ConvertPosition


      for (int i = 0, size = children.size(); i < size; i++) {
        Node child = (Node) children.get(i);
        if (child != null) {
          Node childPreview = previewConvert(child);
          if (childPreview != null) {
            ConvertPosition position = converter
                .getChildVisualPosition(child);
            if (position != null) {
              /* FIX for bug #179403
              // FIXME: not using index here, need fix.
              position.getParentNode().appendChild(childPreview);
              */
              NodeList childNodes = position.getParentNode().getChildNodes();
              if (childNodes.getLength() > position.getIndex()) {
                Node item = childNodes.item(position.getIndex());
                position.getParentNode().insertBefore(childPreview, item);
              } else {
                position.getParentNode().appendChild(childPreview);
              }
            }
          }
        }
      }
View Full Code Here


      Node curNode = childNodes.item(i);
      if (
          curNode.getNodeType() == Node.ELEMENT_NODE ||
          curNode.getNodeType() == Node.TEXT_NODE ||
          curNode.getNodeType() == Node.CDATA_SECTION_NODE) {
        addChild(curNode, new ConvertPosition(destElement, index++));
      }
    }
  }
View Full Code Here

     * being requested.
     * @return the current ConvertPosition instance for the specified Node
     * instance.
     */
    public ConvertPosition get(Node node) {
      ConvertPosition convertPosition = null;
      List convertPositions = (List)mapOfConvertPositions.get(node);
      if (convertPositions != null) {
        int index;
        Object obj = mapOfIndexes.get(node);
        if (obj != null) {
View Full Code Here

            return;
        }
       
    Node childNode = (Node) childEditPart.getModel();
    IFigure childFigure = ((GraphicalEditPart) childEditPart).getFigure();
    ConvertPosition position = _tagConverter
        .getChildVisualPosition(childNode);
    if (position != null) {
      Node parent = position.getParentNode();
      // link up figure.
      IFigure parentFigure = getFigure(parent);
      if (parentFigure != null) {
        parentFigure.add(childFigure, position.getIndex());
        figureAdded = true;
      }
      // link up style
      if (parent instanceof INodeNotifier) {
        ICSSStyle parentStyle = (ICSSStyle) ((INodeNotifier) parent)
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.converter.ConvertPosition

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.