private static boolean findPreviousNode(AlignmentInColumnsConfig config,
                                          ASTNode from,
                                          IElementType targetType,
                                          boolean processFrom,
                                          boolean processParent,
                                          NodeProcessor processor) {
    if (from == null) return false;

    for (ASTNode prev = processFrom ? from : from.getTreePrev(); prev != null; prev = prev.getTreePrev()) {
      IElementType prevType = prev.getElementType();
      if (prevType == targetType) {
        if (processor.targetTypeFound(prev)) return true;
      }
      else if (config.getWhiteSpaceTokenTypes().contains(prevType)) {
        if (processor.whitespaceFound(prev)) return true;
      }

      if (findPreviousNode(config, prev.getLastChildNode(), targetType, true, false, processor)) return true;
    }

    if (processParent) {
      for (ASTNode parent = from.getTreeParent(); parent != null; parent = parent.getTreeParent()) {
        if (findPreviousNode(config, parent, targetType, false, false, processor)) return true;
      }
    }
    return false;
  }
private static boolean findPreviousNode(AlignmentInColumnsConfig config,
                                          ASTNode from,
                                          IElementType targetType,
                                          boolean processFrom,
                                          boolean processParent,
                                          NodeProcessor processor)