Examples of InlineEditingNavigationMediator


Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

    setRange(position);
  }

  private DesignPosition performObjectMode() {
    DesignPosition result = null;
    IMovementMediator validator = new InlineEditingNavigationMediator(
        new ActionData(ActionData.KEYBOARD_NAVAGATION, null));
    DesignPosition position = getCurrentObjectPosition();
    if (position != null) {
      _viewer.setRange(position, position);
      if (!validator.isValidPosition(position)) {
        position = performInlineMode(_forward);
        if (validator.isValidPosition(position)) {
          result = position;
        } else {
          result = performInlineMode(!_forward);
        }
      } else {
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

    DesignRange range = _viewer.getRangeSelection();
    if (range == null || !range.isValid()) {
      _log.error("invalid range"); //$NON-NLS-1$
      return;
    }
    IMovementMediator moveMediator = new InlineEditingNavigationMediator(
        new ActionData(ActionData.KEYBOARD_NAVAGATION, null));
    DesignPosition position = range.getEndPosition();
    Caret caret = _viewer.getCaret();
    Point point = null;
    DesignPosition newPos = position;
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

    _viewer = viewer;
  }

  public void execute() {
    Node document = _viewer.getModel().getDocument();
    IMovementMediator validator = new InlineEditingNavigationMediator(
        new ActionData(ActionData.KEYBOARD_NAVAGATION, null));
    Node htmlRoot = RootContainerPositionRule
        .getBasicContainer((Document) document);
    Node jsfRoot = JSFRootContainerPositionRule
        .getBasicContainer((Document) document, 3);
    Node root;
    if (htmlRoot != null && jsfRoot != null) {
      if (EditModelQuery.isChild(htmlRoot, jsfRoot)) {
        root = htmlRoot;
      } else if (EditModelQuery.isChild(jsfRoot, htmlRoot)) {
        root = jsfRoot;
      } else {
        root = htmlRoot;
      }
    } else {
      if (htmlRoot != null) {
        root = htmlRoot;
      } else if (jsfRoot != null) {
        root = jsfRoot;
      } else {
        root = document;
      }
    }
    IDOMPosition position1, position2;
    // if (root.hasChildNodes())
    // {
    // Node first = root.getFirstChild();
    // position1 = new DOMRefPosition(first, false);
    // Node last = root.getLastChild();
    // position2 = new DOMRefPosition(last, true);
    // }
    // else
    // {
    position1 = new DOMPosition(root, 0);
    position2 = new DOMPosition(root, root.getChildNodes().getLength());
    // }
    if (!validator.isValidPosition(position1)) {
      position1 = EditHelper.moveToNextEditPosition(position1, true,
          validator);
    }
    if (!validator.isValidPosition(position2)) {
      position2 = EditHelper.moveToNextEditPosition(position2, false,
          validator);
    }
    if (EditValidateUtil.validPosition(position1)
        && EditValidateUtil.validPosition(position2)) {
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

   * Delete one node or char at operation position.
   */
  private void deleteSingle() {
    IDOMPosition opPosition = getOperationPosition();
    opPosition = EditHelper.moveToNextEditPosition(getOperationPosition(),
        _forward, new InlineEditingNavigationMediator(new ActionData(
            ActionData.INLINE_EDIT, null)));
    // for inner debug
    if (INNER_DEBUG) {
      _log.info("EditHelper, now we are at:" + opPosition); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

    super.preExecute();
  }

  private DesignPosition findObjectModePosition() {
    DesignPosition result = null;
    IMovementMediator validator = new InlineEditingNavigationMediator(
        new ActionData(ActionData.KEYBOARD_NAVAGATION, null));
    DesignPosition position = getCurrentObjectPosition();
    if (position != null) {
      if (!validator.isValidPosition(position)) {
        result = null;
      } else {
        result = position;
      }
    }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.validation.caret.InlineEditingNavigationMediator

  public static DesignPosition moveToNextEditPosition(int action,
      DesignPosition currentPosition, boolean forward) {
    IDOMPosition position;
    position = DOMPositionHelper.toDOMPosition(currentPosition);
    position = moveToNextEditPosition(position, forward,
        new InlineEditingNavigationMediator(
            new ActionData(action, null)));
    if (position == null) {
      return currentPosition;
    }
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.