Package org.eclipse.jst.pagedesigner.commands.range

Examples of org.eclipse.jst.pagedesigner.commands.range.WorkNode


    // int left = EditModelQuery.getNodeStartIndex(currentNode);
    // int right = EditModelQuery.getNodeEndIndex(currentNode);
    int location1 = getLocation(currentNode, pos1, false);
    int location2 = getLocation(currentNode, pos2, false);
    if (location1 <= IN_MIDDLE && location2 >= IN_MIDDLE) {
      workNode.push(new WorkNode(currentNode, pos1, pos2));
    }
  }
View Full Code Here


    } else {
      int location1 = getLocation(currentNode, pos1, false);
      int location2 = getLocation(currentNode, pos2, false);
      if (location1 < IN_MIDDLE && location2 > IN_MIDDLE) {
        // TODO: push the node into result.--
        result.push(new WorkNode(currentNode, pos1, pos2));
      } else if (location1 <= IN_MIDDLE && location2 >= IN_MIDDLE) {
        if (currentNode.hasChildNodes()) {
          Node child = currentNode.getFirstChild();
          Stack myResult = new Stack();
          while (child != null) {
            collectNodes(child, pos1, pos2, top, myResult);
            child = child.getNextSibling();
          }
          if (location1 < IN_MIDDLE && location2 >= IN_MIDDLE
              || location1 <= IN_MIDDLE && location2 > IN_MIDDLE) {
            WorkNode workNode = new WorkNode(currentNode, pos1,
                pos2);
            while (myResult.size() > 0) {
              WorkNode w = (WorkNode) myResult.remove(0);
              if (w.getNode().getParentNode() == workNode
                  .getNode()) {
                w.setParent(workNode);
              }
              result.push(w);
            }
            // TODO: push parent into result.--
            result.push(workNode);
          }
        } else {
          if (!(location1 == IN_MIDDLE && location2 == IN_MIDDLE)) {
            // TODO: push this node into result.
            result.push(new WorkNode(currentNode, pos1, pos2));
          }
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.commands.range.WorkNode

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.