Search in sources :

Example 1 with ChangesBrowserWithRollback

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();
    }
}
Also used : ChangesBrowserWithRollback(git4idea.ui.ChangesBrowserWithRollback) DialogBuilder(com.intellij.openapi.ui.DialogBuilder) MultiLineLabel(com.intellij.openapi.ui.ex.MultiLineLabel)

Aggregations

DialogBuilder (com.intellij.openapi.ui.DialogBuilder)1 MultiLineLabel (com.intellij.openapi.ui.ex.MultiLineLabel)1 ChangesBrowserWithRollback (git4idea.ui.ChangesBrowserWithRollback)1