summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/openapi/command/impl/UndoReportHandler.java
blob: d83808b4285c4ed99f1f497bc53b0962a4025824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.command.impl;

import com.intellij.openapi.command.undo.DocumentReference;
import com.intellij.openapi.command.undo.UnexpectedUndoException;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.NlsContexts;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;

public interface UndoReportHandler {
  ExtensionPointName<UndoReportHandler> EP_NAME = ExtensionPointName.create("com.intellij.undoReportHandler");

  boolean reportNonUndoable(@Nullable Project project,
                            @NotNull Collection<? extends DocumentReference> problemFiles,
                            boolean isUndo);

  boolean reportClashingDocuments(@Nullable Project project,
                                  @NotNull Collection<? extends DocumentReference> problemFiles,
                                  boolean isUndo);

  boolean reportCannotAdjust(@Nullable Project project,
                             @NotNull Collection<? extends DocumentReference> problemFiles,
                             boolean isUndo);

  boolean reportException(@Nullable Project project,
                          @NotNull UnexpectedUndoException exception,
                          boolean isUndo);

  boolean reportGeneric(@Nullable Project project,
                        @NlsContexts.DialogMessage String message,
                        @NotNull Collection<? extends DocumentReference> problemFiles);
}