@Override
  protected @NotNull CodeInsightActionHandler getHandler() {
    return new CodeInsightActionHandler() {
      @Override
      public void invoke(final @NotNull Project project, final @NotNull Editor editor, final @NotNull PsiFile file) {
        final Runnable runnable = () -> {
          final DomElement element = myProvider.generate(project, editor, file);
          myProvider.navigate(element);
        };
        
        if (GenerateDomElementAction.this.startInWriteAction()) {
          WriteCommandAction.writeCommandAction(project, file).run(() -> runnable.run());
        }
        else {
          runnable.run();
        }
      }

      @Override
      public boolean startInWriteAction() {
        return false;
      }
    };
  }
@Override
  protected @NotNull CodeInsightActionHandler getHandler()