LookupElement (@NotNull File file) { String name = file.getName(); boolean isDirectory = file.isDirectory(); return LookupElementBuilder.create(file, quote(name)) .withIcon(isDirectory ? PlatformIcons.FOLDER_ICON : null) .withInsertHandler(FILE_INSERT_HANDLER); }