boolean (final ExpressionContext context, final LookupElement item) { Object object = item.getObject(); if (object instanceof PsiFileSystemItem && ((PsiFileSystemItem)object).isDirectory()) { return false; } return true; }