Search in sources :

Example 1 with ThreeSide

use of com.intellij.diff.util.ThreeSide in project intellij-community by JetBrains.

the class MergeUtil method putRevisionInfo.

private static void putRevisionInfo(@NotNull List<? extends DiffContent> contents, @NotNull MergeData data) {
    for (ThreeSide side : ThreeSide.values()) {
        DiffContent content = side.select(contents);
        FilePath filePath = side.select(data.CURRENT_FILE_PATH, data.ORIGINAL_FILE_PATH, data.LAST_FILE_PATH);
        VcsRevisionNumber revision = side.select(data.CURRENT_REVISION_NUMBER, data.ORIGINAL_REVISION_NUMBER, data.LAST_REVISION_NUMBER);
        if (filePath != null && revision != null) {
            content.putUserData(DiffUserDataKeysEx.REVISION_INFO, Pair.create(filePath, revision));
        }
    }
}
Also used : ThreeSide(com.intellij.diff.util.ThreeSide) FilePath(com.intellij.openapi.vcs.FilePath) VcsRevisionNumber(com.intellij.openapi.vcs.history.VcsRevisionNumber) DiffContent(com.intellij.diff.contents.DiffContent)

Aggregations

DiffContent (com.intellij.diff.contents.DiffContent)1 ThreeSide (com.intellij.diff.util.ThreeSide)1 FilePath (com.intellij.openapi.vcs.FilePath)1 VcsRevisionNumber (com.intellij.openapi.vcs.history.VcsRevisionNumber)1