List of usage examples for com.intellij.openapi.diff SimpleContent createEmpty
public static SimpleContent createEmpty()
From source file:com.intellij.diff.actions.impl.ShowOldDiffAction.java
License:Apache License
@NotNull private static com.intellij.openapi.diff.DiffContent convert(@Nullable Project project, @NotNull DiffContent content) {/*from w ww .java 2 s.co m*/ if (content instanceof EmptyContent) return SimpleContent.createEmpty(); if (content instanceof DocumentContent) { Document document = ((DocumentContent) content).getDocument(); return new com.intellij.openapi.diff.DocumentContent(project, document, content.getContentType()); } if (content instanceof FileContent) { VirtualFile file = ((FileContent) content).getFile(); return new com.intellij.openapi.diff.FileContent(project, file); } if (content instanceof DirectoryContent) { VirtualFile file = ((DirectoryContent) content).getFile(); return new com.intellij.openapi.diff.FileContent(project, file); } throw new IllegalArgumentException(); }