@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode) throws IncorrectOperationException {
    if (BasicJavaAstTreeUtil.is(astNode, BASIC_ENUM_CONSTANT)) {
      int insertionOffset = astNode.getTextRange().getEndOffset();
      Document doc = editor.getDocument();
      final CharSequence text = doc.getCharsSequence();
      final int probableCommaOffset = CharArrayUtil.shiftForward(text, insertionOffset, " \t");
      if (probableCommaOffset >= text.length() || text.charAt(probableCommaOffset) != ',') {
        doc.insertString(insertionOffset, ",");
      }
    }
  }
@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode)