boolean (@NotNull DiffRequest request) { if (!(request instanceof ContentDiffRequest)) return false; List<DiffContent> contents = ((ContentDiffRequest)request).getContents(); if (contents.size() != 2 && contents.size() != 3) return false; for (DiffContent content : contents) { if (!ExternalDiffToolUtil.canCreateFile(content)) return false; } return true; }