private static AlignmentStrategy getAlignmentStrategy(Alignment alignment, ASTNode baseNode, @NotNull CommonCodeStyleSettings settings) {
    if (baseNode.getElementType() != JavaElementType.CLASS || !settings.ALIGN_MULTILINE_EXTENDS_LIST) {
      return AlignmentStrategy.wrap(alignment);
    }
    for (ASTNode node = baseNode.getLastChildNode(); node != null; node = FormatterUtil.getPreviousNonWhitespaceSibling(node)) {
      if (node.getElementType() != JavaElementType.IMPLEMENTS_LIST) {
        continue;
      }
      ASTNode lastChildNode = node.getLastChildNode();
      if (lastChildNode != null && lastChildNode.getElementType() == TokenType.ERROR_ELEMENT) {
        Alignment alignmentToUse = alignment;
        if (alignment == null) {
          alignmentToUse = Alignment.createAlignment();
        }
        return AlignmentStrategy.wrap(
          alignmentToUse, false, JavaTokenType.LBRACE, JavaElementType.JAVA_CODE_REFERENCE, node.getElementType()
        );
      }
      break;
    }
    return AlignmentStrategy.wrap(alignment);
  }
private static AlignmentStrategy getAlignmentStrategy(Alignment alignment, ASTNode baseNode, @NotNull CommonCodeStyleSettings settings)