use of com.intellij.diff.chains.SimpleDiffRequestChain in project intellij-community by JetBrains.
the class DiffManagerImpl method showDiffBuiltin.
@Override
public void showDiffBuiltin(@Nullable Project project, @NotNull DiffRequest request, @NotNull DiffDialogHints hints) {
DiffRequestChain requestChain = new SimpleDiffRequestChain(request);
showDiffBuiltin(project, requestChain, hints);
}
use of com.intellij.diff.chains.SimpleDiffRequestChain in project intellij-community by JetBrains.
the class ExternalDiffTool method show.
public static void show(@Nullable final Project project, @NotNull final DiffRequestChain chain, @NotNull final DiffDialogHints hints) {
try {
//noinspection unchecked
final Ref<List<DiffRequest>> requestsRef = new Ref<>();
final Ref<Throwable> exceptionRef = new Ref<>();
ProgressManager.getInstance().run(new Task.Modal(project, "Loading Requests", true) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
try {
requestsRef.set(collectRequests(project, chain, indicator));
} catch (Throwable e) {
exceptionRef.set(e);
}
}
});
if (!exceptionRef.isNull())
throw exceptionRef.get();
List<DiffRequest> showInBuiltin = new ArrayList<>();
for (DiffRequest request : requestsRef.get()) {
if (canShow(request)) {
showRequest(project, request);
} else {
showInBuiltin.add(request);
}
}
if (!showInBuiltin.isEmpty()) {
DiffManagerEx.getInstance().showDiffBuiltin(project, new SimpleDiffRequestChain(showInBuiltin), hints);
}
} catch (ProcessCanceledException ignore) {
} catch (Throwable e) {
LOG.warn(e);
Messages.showErrorDialog(project, e.getMessage(), "Can't Show Diff In External Tool");
}
}
use of com.intellij.diff.chains.SimpleDiffRequestChain in project intellij-community by JetBrains.
the class DiffManagerImpl method showDiff.
@Override
public void showDiff(@Nullable Project project, @NotNull DiffRequest request, @NotNull DiffDialogHints hints) {
DiffRequestChain requestChain = new SimpleDiffRequestChain(request);
showDiff(project, requestChain, hints);
}
Aggregations