JComponent (@Nullable @NlsContexts.Label String title, @NotNull DiffContent content, boolean equalCharsets, boolean equalSeparators, @Nullable Editor editor, @Nullable DiffEditorTitleCustomizer titleCustomizer) { if (content instanceof EmptyContent) return null; DocumentContent documentContent = (DocumentContent)content; Charset charset = equalCharsets ? null : documentContent.getCharset(); Boolean bom = equalCharsets ? null : documentContent.hasBom(); LineSeparator separator = equalSeparators ? null : documentContent.getLineSeparator(); boolean isReadOnly = editor == null || editor.isViewer() || !canMakeWritable(editor.getDocument()); return createTitle(title, separator, charset, bom, isReadOnly, titleCustomizer); }