mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Removed unnecessary "QuickMergeInteraction.showError()"
Utilized "QuickMergeInteraction.showErrors()" instead
This commit is contained in:
@@ -16,19 +16,21 @@
|
||||
package org.jetbrains.idea.svn.integrate;
|
||||
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import org.jetbrains.annotations.CalledInAwt;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.continuation.Continuation;
|
||||
import com.intellij.util.continuation.TaskDescriptor;
|
||||
import org.jetbrains.annotations.CalledInAwt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.util.ObjectUtils.notNull;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
public class QuickMerge {
|
||||
|
||||
@NotNull private final MergeContext myMergeContext;
|
||||
@@ -57,19 +59,19 @@ public class QuickMerge {
|
||||
myContinuation.addExceptionHandler(VcsException.class, new Consumer<VcsException>() {
|
||||
@Override
|
||||
public void consume(VcsException e) {
|
||||
myInteraction.showErrors(myMergeContext.getTitle(), Collections.singletonList(e));
|
||||
myInteraction.showErrors(myMergeContext.getTitle(), singletonList(e));
|
||||
}
|
||||
});
|
||||
myContinuation.addExceptionHandler(SVNException.class, new Consumer<SVNException>() {
|
||||
@Override
|
||||
public void consume(SVNException e) {
|
||||
myInteraction.showErrors(myMergeContext.getTitle(), Collections.singletonList(new VcsException(e)));
|
||||
myInteraction.showErrors(myMergeContext.getTitle(), singletonList(new VcsException(e)));
|
||||
}
|
||||
});
|
||||
myContinuation.addExceptionHandler(RuntimeException.class, new Consumer<RuntimeException>() {
|
||||
@Override
|
||||
public void consume(RuntimeException e) {
|
||||
myInteraction.showError(e);
|
||||
myInteraction.showErrors(notNull(e.getMessage(), e.getClass().getName()), singletonList(new VcsException(e)));
|
||||
}
|
||||
});
|
||||
myContinuation.run(tasks);
|
||||
|
||||
@@ -46,7 +46,6 @@ public interface QuickMergeInteraction {
|
||||
|
||||
void showIntersectedLocalPaths(final List<FilePath> paths);
|
||||
|
||||
void showError(@NotNull Exception exception);
|
||||
void showErrors(final String message, final List<VcsException> exceptions);
|
||||
void showErrors(final String message, final boolean isError);
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.svn.dialogs.*;
|
||||
import org.jetbrains.idea.svn.mergeinfo.MergeChecker;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -125,12 +124,6 @@ public class QuickMergeInteractionImpl implements QuickMergeInteraction {
|
||||
paths, "The following file(s) have local changes that will intersect with merge changes:");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(@NotNull Exception exception) {
|
||||
AbstractVcsHelper.getInstance(myProject).showErrors(Collections.singletonList(new VcsException(exception)),
|
||||
exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showErrors(String message, List<VcsException> exceptions) {
|
||||
AbstractVcsHelper.getInstance(myProject).showErrors(exceptions, message);
|
||||
|
||||
@@ -100,11 +100,6 @@ public class QuickMergeTestInteraction implements QuickMergeInteraction {
|
||||
public void showIntersectedLocalPaths(List<FilePath> paths) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(@NotNull Exception exception) {
|
||||
myExceptions.add(exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showErrors(String message, List<VcsException> exceptions) {
|
||||
if (!isEmpty(exceptions)) {
|
||||
|
||||
Reference in New Issue
Block a user