Package org.eclipse.jst.pagedesigner.dom

Examples of org.eclipse.jst.pagedesigner.dom.DOMRange


   */
  protected DOMRange doRangeExecute(DOMRange selection) {
    InsertEdit edit = new InsertEdit(selection, getViewer(),
        new ClipboardData(getViewer().getControl()));
    if (edit.operate()) {
      return new DOMRange(edit.getOperationPosition(), edit
          .getOperationPosition());
    }
        return selection;
  }
View Full Code Here


        stylenode.getParentNode().removeChild(sibling);
        node = startContainer;
      }
    }

    return new DOMRange(start, end);

    /*
     * boolean ordered = range.isOrdered(); IDOMPosition start = ordered ?
     * range.getStartPosition() : range.getEndPosition(); IDOMPosition end =
     * ordered ? range.getEndPosition() : range.getStartPosition();
View Full Code Here

        }
        textNode.getParentNode().removeChild(textNode);
      }
    }

    return new DOMRange(new DOMRefPosition(middleText, false),
        new DOMRefPosition(middleText, true));
  }
View Full Code Here

    if (range == null)
      return null;

    IDOMPosition position = DOMPositionHelper.removeRange(range);
    position = doContent(position);
    return new DOMRange(position, position);

  }
View Full Code Here

   */
  protected DOMRange doRangeExecute(DOMRange selection) {
    DesignEdit edit = null;
    edit = new InsertEdit(selection, getViewer(), _data);
    edit.perform();
    selection = new DOMRange(edit.getOperationPosition(), edit
        .getOperationPosition());
    return selection;
  }
View Full Code Here

      start = DOMPositionHelper.toDOMRefPosition(start);
      end = DOMPositionHelper.toDOMRefPosition(end);
      Node parent = common.getParentNode();
      EditModelQuery.copyChildren(common, parent);
      common.getParentNode().removeChild(common);
      return new DOMRange(start, end);
    }
    return null;
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.commands.range.DesignEdit#operate()
   */
  public boolean operate() {
    DOMRange range = getRange();
    if (!EditModelQuery.isSame(range.getStartPosition(), range
        .getEndPosition())) {
      deleteRange();
      range = new DOMRange(getOperationPosition(), getOperationPosition());
      setRange(range);
    }
    if (insertNodes()) {
      return true;
    } else if (insertString()) {
View Full Code Here

   * @param viewer
   * @param data
   */
  public InsertEdit(IDOMPosition position, GraphicalViewer viewer,
      IInputSourceProvider data) {
    super(new DOMRange(position, position), viewer);
    setOperationPosition(position);
    _data = data;
  }
View Full Code Here

  /**
   * @param start
   * @param end
   */
  public Paragraph(IDOMPosition start, IDOMPosition end) {
    _range = new DOMRange(start, end);
  }
View Full Code Here

   *
   * @see org.eclipse.jst.pagedesigner.commands.range.DesignerToolBarAction#getCommand()
   */
  protected Command getCommand() {
    DesignRange range = getViewer().getRangeSelection();
    DOMRange dRange = DOMRangeHelper.toDOMRange(range);
    Command command;
    if (isApplied(dRange)) {
      // command = new UnapplyStyleCommand(getViewer(), _expectedTag,
      // null, null);
      // since the un-applystyle is not implemented yet,we do nothing
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.dom.DOMRange

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.