Search in sources :

Example 36 with DiffContent

use of com.intellij.diff.contents.DiffContent in project intellij-community by JetBrains.

the class SelectionHistoryDialogTest method testDiffContentsAndTitleForCurrentRevision.

public void testDiffContentsAndTitleForCurrentRevision() throws IOException {
    initModelOnSecondLineAndSelectRevisions(0, 0);
    assertEquals("Current", dm.getRightTitle(new NullRevisionsProgress()));
    DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
    assertContent("bcd", right);
    assertTrue(right instanceof DocumentFragmentContent);
}
Also used : NullRevisionsProgress(com.intellij.history.integration.ui.models.NullRevisionsProgress) DiffContent(com.intellij.diff.contents.DiffContent) DocumentFragmentContent(com.intellij.diff.actions.DocumentFragmentContent)

Example 37 with DiffContent

use of com.intellij.diff.contents.DiffContent in project intellij-community by JetBrains.

the class SelectionHistoryDialogTest method testDiffContents.

public void testDiffContents() throws IOException {
    initModelOnSecondLineAndSelectRevisions(0, 1);
    DiffContent left = dm.getLeftDiffContent(new NullRevisionsProgress());
    DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
    assertContent("b", left);
    assertContent("bc", right);
}
Also used : NullRevisionsProgress(com.intellij.history.integration.ui.models.NullRevisionsProgress) DiffContent(com.intellij.diff.contents.DiffContent)

Aggregations

DiffContent (com.intellij.diff.contents.DiffContent)37 SimpleDiffRequest (com.intellij.diff.requests.SimpleDiffRequest)14 NotNull (org.jetbrains.annotations.NotNull)12 Nullable (org.jetbrains.annotations.Nullable)10 ContentDiffRequest (com.intellij.diff.requests.ContentDiffRequest)7 ArrayList (java.util.ArrayList)7 VirtualFile (com.intellij.openapi.vfs.VirtualFile)6 IOException (java.io.IOException)6 DiffRequest (com.intellij.diff.requests.DiffRequest)5 DocumentContent (com.intellij.diff.contents.DocumentContent)3 FileContent (com.intellij.diff.contents.FileContent)3 Project (com.intellij.openapi.project.Project)3 FilePath (com.intellij.openapi.vcs.FilePath)3 DiffIgnoredRangeProvider (com.intellij.diff.lang.DiffIgnoredRangeProvider)2 BinaryMergeRequestImpl (com.intellij.diff.requests.BinaryMergeRequestImpl)2 NullRevisionsProgress (com.intellij.history.integration.ui.models.NullRevisionsProgress)2 Editor (com.intellij.openapi.editor.Editor)2 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)2 Ref (com.intellij.openapi.util.Ref)2 VcsRevisionNumber (com.intellij.openapi.vcs.history.VcsRevisionNumber)2