Search in sources :

Example 1 with SvnCommittedChangesTableModel

use of org.jetbrains.idea.svn.history.SvnCommittedChangesTableModel in project intellij-community by JetBrains.

the class SvnSelectRevisionUtil method chooseCommittedChangeList.

@Nullable
public static SvnChangeList chooseCommittedChangeList(final Project project, final SvnRepositoryLocation location, final VirtualFile root) {
    try {
        final SvnCommittedChangesTableModel model = new SvnCommittedChangesTableModel(location, project, root, SvnVcs.getInstance(project).getCommittedChangesProvider().getColumns());
        final ChangesBrowserDialog dlg = new ChangesBrowserDialog(project, model, ChangesBrowserDialog.Mode.Choose, null);
        if (dlg.showAndGet()) {
            return (SvnChangeList) dlg.getSelectedChangeList();
        }
        model.onBeforeClose();
    } catch (VcsException e) {
        Messages.showErrorDialog(e.getMessage(), SvnBundle.message("error.cannot.load.revisions"));
    }
    return null;
}
Also used : SvnCommittedChangesTableModel(org.jetbrains.idea.svn.history.SvnCommittedChangesTableModel) SvnChangeList(org.jetbrains.idea.svn.history.SvnChangeList) VcsException(com.intellij.openapi.vcs.VcsException) ChangesBrowserDialog(com.intellij.openapi.vcs.changes.committed.ChangesBrowserDialog) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

VcsException (com.intellij.openapi.vcs.VcsException)1 ChangesBrowserDialog (com.intellij.openapi.vcs.changes.committed.ChangesBrowserDialog)1 Nullable (org.jetbrains.annotations.Nullable)1 SvnChangeList (org.jetbrains.idea.svn.history.SvnChangeList)1 SvnCommittedChangesTableModel (org.jetbrains.idea.svn.history.SvnCommittedChangesTableModel)1