Examples of DOMRefPosition


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

  }

  private static int computeOffset(IDOMPosition pos, Text textNode) {
    int domOffset = 0;
    if (pos instanceof DOMRefPosition) {
      DOMRefPosition rep = (DOMRefPosition) pos;
      boolean forward = rep.isForward();
      Node refNode = rep.getReferenceNode();

      if ((refNode != textNode) && forward || (refNode == textNode)
          && !forward) {
        domOffset = 0;
      } else {
View Full Code Here

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

          .getFirstElement();
      if (element instanceof ElementEditPart) {
        updateRangeSelection(new DesignRefPosition((EditPart) element,
            false), new DesignRefPosition((EditPart) element, true));
      } else if (element instanceof Node) {
        IDOMPosition start = new DOMRefPosition((Node) element, false);
        IDOMPosition end = new DOMRefPosition((Node) element, true);
        updateRangeSelection(DOMPositionHelper.toDesignPosition(start),
            DOMPositionHelper.toDesignPosition(end));
      }
    }
  }
View Full Code Here

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

//      boolean atPointRight = isAfterPoint(_point);
//      if (atPointLeft == atPointRight) {
//          // TODO: and...?
//      }
      Target target = new Target(getPart());
      if (validator.isValidPosition(new DOMRefPosition(target.getNode(),
          atPointLeft))) {
        result = new DesignRefPosition(_part, atPointLeft);
      } else if (validator.isValidPosition(new DOMRefPosition(target
          .getNode(), !atPointLeft))) {
        result = new DesignRefPosition(_part, !atPointLeft);
      } else if (validator.isEditable(target)) {
        if (atPointLeft) {
          result = new DesignPosition(_part, 0);
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.