Package org.eclipse.jst.pagedesigner.viewer

Examples of org.eclipse.jst.pagedesigner.viewer.DesignRefPosition


    boolean result = super.canReference(target, atRight);
    if (EditModelQuery.isText(target.getNode())) {
      if (((Text) target.getNode()).getData().length() == 0) {
        result = false;
      } else if (EditModelQuery.isTransparentText(target.getNode())) {
        DesignPosition position = new DesignRefPosition(target
            .getPart(), atRight);
        if (EditPartPositionHelper.getConcretePart(position, atRight) != null) {
          result = true;
        } else {
          EditPart part = EditPartPositionHelper.getNextConcretPart(
View Full Code Here


    } else {
      List parts = _viewer.getSelectedEditParts();
      if (parts.size() > 0) {
        EditPart selection = (EditPart) parts.get(0);
        if (selection instanceof SubNodeEditPart) {
          DesignPosition position = new DesignRefPosition(selection,
              _forward);
          result = new DesignRange(position, position);
        }
      }
    }
View Full Code Here

      EditPart part = (EditPart) container.getAdapterFor(EditPart.class);
      if (part != null) {
        // XXX: what if the node has not corresponding part?
        EditPart child = DOMPositionHelper.findEditPart(part, node);
        if (child != null) {
          return new DesignRefPosition(child, position.isForward());
        }
                return DesignPosition.INVALID;
      }
            node = node.getParentNode();
    } while (true);
View Full Code Here

    } else {
      List parts = _viewer.getSelectedEditParts();
      if (parts.size() > 0) {
        EditPart selection = (EditPart) parts.get(0);
        if (selection instanceof SubNodeEditPart) {
          DesignPosition position = new DesignRefPosition(selection,
              false);
          position = DOMPositionHelper.toDesignPosition(EditHelper
              .ensureDOMPosition(DOMPositionHelper
                  .toDOMPosition(position)));
          result = new DesignRange(position, position);
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.viewer.DesignRefPosition

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.