@Override
  public Result preprocessEnter(final @NotNull PsiFile file, final @NotNull Editor editor, final @NotNull Ref<Integer> caretOffset, final @NotNull Ref<Integer> caretAdvance,
                                final @NotNull DataContext dataContext, final EditorActionHandler originalHandler) {
    final Project project = CommonDataKeys.PROJECT.getData(dataContext);
    
    if ((file instanceof XmlFile || HtmlUtil.supportsXmlTypedHandlers(file)) &&
        isBetweenXmlTags(project, editor, file, caretOffset.get().intValue())) {
      editor.getDocument().insertString(caretOffset.get(), "\n");
      if (project != null) {
        CodeStyleManager.getInstance(project).adjustLineIndent(editor.getDocument(), caretOffset.get() + 1);
      }
      return Result.DefaultForceIndent;
    }
    return Result.Continue;
  }
@Override
  public Result preprocessEnter(final @NotNull PsiFile file, final @NotNull Editor editor, final @NotNull Ref<Integer> caretOffset, final @NotNull Ref<Integer> caretAdvance,
                                final @NotNull DataContext dataContext, final EditorActionHandler originalHandler)