use of git4idea.ui.ChangesBrowserWithRollback in project intellij-community by JetBrains.
the class LocalChangesWouldBeOverwrittenHelper method showErrorDialog.
private static void showErrorDialog(@NotNull Project project, @NotNull String operationName, @NotNull List<Change> changes, @NotNull Collection<String> absolutePaths) {
String title = "Local Changes Prevent from " + StringUtil.capitalize(operationName);
String description = getErrorDialogDescription();
if (changes.isEmpty()) {
GitUtil.showPathsInDialog(project, absolutePaths, title, description);
} else {
DialogBuilder builder = new DialogBuilder(project);
builder.setNorthPanel(new MultiLineLabel(description));
builder.setCenterPanel(new ChangesBrowserWithRollback(project, changes));
builder.addOkAction();
builder.setTitle(title);
builder.show();
}
}
Aggregations