Search in sources :

Example 1 with PatchReader

use of com.intellij.openapi.diff.impl.patch.PatchReader in project intellij-community by JetBrains.

the class PatchingTestCase method applyPatch.

protected void applyPatch() throws Exception {
    PatchReader reader = PatchVirtualFileReader.create(LocalFileSystem.getInstance().refreshAndFindFileByPath(patchFilePath));
    List<FilePatch> patches = new ArrayList<>(reader.readTextPatches());
    new PatchApplier<BinaryFilePatch>(myProject, myRoot, patches, null, null, null).execute();
}
Also used : ArrayList(java.util.ArrayList) FilePatch(com.intellij.openapi.diff.impl.patch.FilePatch) BinaryFilePatch(com.intellij.openapi.diff.impl.patch.BinaryFilePatch) BinaryFilePatch(com.intellij.openapi.diff.impl.patch.BinaryFilePatch) PatchReader(com.intellij.openapi.diff.impl.patch.PatchReader)

Aggregations

BinaryFilePatch (com.intellij.openapi.diff.impl.patch.BinaryFilePatch)1 FilePatch (com.intellij.openapi.diff.impl.patch.FilePatch)1 PatchReader (com.intellij.openapi.diff.impl.patch.PatchReader)1 ArrayList (java.util.ArrayList)1