List of usage examples for com.intellij.openapi.diff SimpleContent SimpleContent
public SimpleContent(@NotNull String text, FileType type)
From source file:com.intellij.history.integration.ui.models.FileDifferenceModel.java
License:Apache License
protected SimpleContent createSimpleDiffContent(String content, Entry e) { return new SimpleContent(content, myGateway.getFileType(e.getName())); }
From source file:com.intellij.ide.diff.DiffElement.java
License:Apache License
@Nullable protected DiffContent createDiffContent() throws IOException { return new SimpleContent(new String(getContent(), getCharset()), getFileType()); }
From source file:com.ritesh.idea.plugin.ui.diff.ReviewDiffRequest.java
License:Apache License
@NotNull @Override//from ww w . j a v a 2 s.c om public DiffContent[] getContents() { try { ContentRevision beforeRevision = selectedChange.getBeforeRevision(); ContentRevision afterRevision = selectedChange.getAfterRevision(); FileType srcFileType = FileTypeRegistry.getInstance() .getFileTypeByFileName(beforeRevision.getFile().getName()); FileType dstFileType = FileTypeRegistry.getInstance() .getFileTypeByFileName(afterRevision.getFile().getName()); return new DiffContent[] { new SimpleContent(defaultString(beforeRevision.getContent()), srcFileType), new SimpleContent(defaultString(afterRevision.getContent()), dstFileType) }; } catch (Exception e1) { throw new RuntimeException(e1); } }