public abstract class BaseDiffFromHistoryHandler<T extends VcsFileRevision> extends java.lang.Object implements DiffFromHistoryHandler
Modifier and Type | Class and Description |
---|---|
protected class |
BaseDiffFromHistoryHandler.CollectChangesTask |
Modifier | Constructor and Description |
---|---|
protected |
BaseDiffFromHistoryHandler(Project project) |
Modifier and Type | Method and Description |
---|---|
protected void |
doShowDiff(FilePath filePath,
VcsFileRevision older,
VcsFileRevision newer) |
protected abstract java.util.List<Change> |
getAffectedChanges(FilePath path,
T rev) |
protected java.lang.String |
getAffectedChangesDialogTitle(FilePath path,
T rev) |
protected abstract java.util.List<Change> |
getChangesBetweenRevisions(FilePath path,
T rev1,
T rev2) |
protected java.lang.String |
getChangesBetweenRevisionsDialogTitle(FilePath path,
T rev1,
T rev2) |
protected abstract java.lang.String |
getPresentableName(T revision) |
protected void |
showAffectedChanges(FilePath path,
T rev) |
protected void |
showChangesBetweenRevisions(FilePath path,
T older,
T newer) |
protected void |
showChangesDialog(java.lang.String title,
java.util.List<? extends Change> changes) |
void |
showDiffForOne(AnActionEvent e,
Project project,
FilePath filePath,
VcsFileRevision previousRevision,
VcsFileRevision revision)
Show diff when a single revision is selected in the file history panel.
|
void |
showDiffForTwo(Project project,
FilePath filePath,
VcsFileRevision older,
VcsFileRevision newer)
Show diff for 2 revisions selected from the file history panel,
or "Show Diff with Local" (then the second revision is a
CurrentRevision . |
protected void |
showError(VcsException e,
java.lang.String logMessage) |
protected final Project myProject
protected BaseDiffFromHistoryHandler(Project project)
public void showDiffForOne(AnActionEvent e, Project project, FilePath filePath, VcsFileRevision previousRevision, VcsFileRevision revision)
DiffFromHistoryHandler
showDiffForOne
in interface DiffFromHistoryHandler
e
- AnActionEvent which happened, when user invoked "Show Diff".filePath
- the file which history is shown.previousRevision
- the previous revision in the list displayed file history panel, may be VcsFileRevision.NULL
.revision
- the revision selected in the file history panel.public void showDiffForTwo(Project project, FilePath filePath, VcsFileRevision older, VcsFileRevision newer)
DiffFromHistoryHandler
CurrentRevision
.
The order of selected revisions is not defined.showDiffForTwo
in interface DiffFromHistoryHandler
filePath
- the file which history is shown.older
- one of the selected revisions.newer
- another selected revision.protected void doShowDiff(FilePath filePath, VcsFileRevision older, VcsFileRevision newer)
protected void showChangesBetweenRevisions(FilePath path, T older, T newer)
protected abstract java.util.List<Change> getChangesBetweenRevisions(FilePath path, T rev1, T rev2) throws VcsException
VcsException
protected abstract java.util.List<Change> getAffectedChanges(FilePath path, T rev) throws VcsException
VcsException
protected abstract java.lang.String getPresentableName(T revision)
protected void showChangesDialog(java.lang.String title, java.util.List<? extends Change> changes)
protected void showError(VcsException e, java.lang.String logMessage)
protected java.lang.String getChangesBetweenRevisionsDialogTitle(FilePath path, T rev1, T rev2)