本文整理汇总了Java中com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchFactory类的典型用法代码示例。如果您正苦于以下问题:Java ApplyFilePatchFactory类的具体用法?Java ApplyFilePatchFactory怎么用?Java ApplyFilePatchFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApplyFilePatchFactory类属于com.intellij.openapi.diff.impl.patch.apply包,在下文中一共展示了ApplyFilePatchFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPatch
import com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchFactory; //导入依赖的package包/类
private void addPatch(final FilePatch patch, final VirtualFile file) {
final Pair<VirtualFile, ApplyFilePatchBase> patchPair = Pair.create(file, ApplyFilePatchFactory.createGeneral(patch));
if (patch instanceof TextFilePatch) {
myTextPatches.add(Pair.create(file, ApplyFilePatchFactory.create((TextFilePatch)patch)));
} else {
final ApplyFilePatchBase<BinaryType> applyBinaryPatch = (ApplyFilePatchBase<BinaryType>)((patch instanceof BinaryFilePatch)
? ApplyFilePatchFactory
.create((BinaryFilePatch)patch)
:
ApplyFilePatchFactory.create(
(ShelveChangesManager.ShelvedBinaryFilePatch)patch));
myBinaryPatches.add(Pair.create(file, applyBinaryPatch));
}
myWritableFiles.add(file);
}
示例2: addPatch
import com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchFactory; //导入依赖的package包/类
private void addPatch(final FilePatch patch, final VirtualFile file) {
final Pair<VirtualFile, ApplyFilePatchBase> patchPair = new Pair<VirtualFile, ApplyFilePatchBase>(file, ApplyFilePatchFactory.createGeneral(patch));
if (patch instanceof TextFilePatch) {
myTextPatches.add(new Pair<VirtualFile, ApplyTextFilePatch>(file, ApplyFilePatchFactory.create((TextFilePatch) patch)));
} else {
final ApplyFilePatchBase<BinaryType> applyBinaryPatch = (ApplyFilePatchBase<BinaryType>) ((patch instanceof BinaryFilePatch) ? ApplyFilePatchFactory
.create((BinaryFilePatch) patch) :
ApplyFilePatchFactory.create((ShelveChangesManager.ShelvedBinaryFilePatch) patch));
myBinaryPatches.add(new Pair<VirtualFile, ApplyFilePatchBase<BinaryType>>(file, applyBinaryPatch));
}
myWritableFiles.add(file);
}
示例3: addPatch
import com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchFactory; //导入依赖的package包/类
private void addPatch(final FilePatch patch, final VirtualFile file) {
final Pair<VirtualFile, ApplyFilePatchBase> patchPair = Pair.create(file, ApplyFilePatchFactory.createGeneral(patch));
if (patch instanceof TextFilePatch) {
myTextPatches.add(Pair.create(file, ApplyFilePatchFactory.create((TextFilePatch)patch)));
} else {
final ApplyFilePatchBase<BinaryType> applyBinaryPatch = (ApplyFilePatchBase<BinaryType>)((patch instanceof BinaryFilePatch)
? ApplyFilePatchFactory
.create((BinaryFilePatch)patch)
: ApplyFilePatchFactory
.create((ShelvedBinaryFilePatch)patch));
myBinaryPatches.add(Pair.create(file, applyBinaryPatch));
}
myWritableFiles.add(file);
}