mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-124972 vcs: do not access DataContext after showing modal dialogs
This commit is contained in:
@@ -96,27 +96,28 @@ public class RollbackAction extends AnAction implements DumbAware {
|
||||
? null
|
||||
: "Can not " + UIUtil.removeMnemonic(RollbackUtil.getRollbackOperationName(project)) + " now";
|
||||
if (ChangeListManager.getInstance(project).isFreezedWithNotification(title)) return;
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
List<FilePath> missingFiles = e.getData(ChangesListView.MISSING_FILES_DATA_KEY);
|
||||
List<Change> changes = getChanges(project, e);
|
||||
LinkedHashSet<VirtualFile> modifiedWithoutEditing = getModifiedWithoutEditing(e, project);
|
||||
if (modifiedWithoutEditing != null) {
|
||||
changes = ContainerUtil.filter(changes, change -> !modifiedWithoutEditing.contains(change.getVirtualFile()));
|
||||
}
|
||||
|
||||
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
boolean hasChanges = false;
|
||||
if (missingFiles != null && !missingFiles.isEmpty()) {
|
||||
hasChanges = true;
|
||||
new RollbackDeletionAction().actionPerformed(e);
|
||||
}
|
||||
|
||||
List<Change> changes = getChanges(project, e);
|
||||
|
||||
final LinkedHashSet<VirtualFile> modifiedWithoutEditing = getModifiedWithoutEditing(e, project);
|
||||
if (modifiedWithoutEditing != null && !modifiedWithoutEditing.isEmpty()) {
|
||||
hasChanges = true;
|
||||
rollbackModifiedWithoutEditing(project, modifiedWithoutEditing);
|
||||
}
|
||||
|
||||
if (modifiedWithoutEditing != null) {
|
||||
changes = ContainerUtil.filter(changes, change -> !modifiedWithoutEditing.contains(change.getVirtualFile()));
|
||||
}
|
||||
|
||||
if (!changes.isEmpty()) {
|
||||
RollbackChangesDialog.rollbackChanges(project, changes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user