boolean (@NotNull PsiElement context) { try { PsiFile file = context.getContainingFile(); CodeStyleSettings settings = CodeStyle.getSettings(file); return !settings.getExcludedFiles().contains(file); } catch (PsiInvalidElementAccessException e) { return false; } }