Java Code Examples for com.intellij.lang.ASTNode.getTreePrev()

The following are Jave code examples for showing how to use getTreePrev() of the com.intellij.lang.ASTNode class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AppleScript-IDEA   File:   Source Code and License Vote up 6 votes
private void _init(@Nullable final ASTNode child) {
  if (child == null) return;

  ASTNode treePrev = child.getTreePrev();
  while (treePrev != null && isWhiteSpace(treePrev)) {
    treePrev = treePrev.getTreePrev();

  if (treePrev == null) {
  } else {
    myChild2 = child;
    myType2 = myChild2.getElementType();

    myChild1 = treePrev;
    myType1 = myChild1.getElementType();
    final CompositeElement parent = (CompositeElement) treePrev.getTreeParent();
    myParent = SourceTreeToPsiMap.treeElementToPsi(parent);