boolean (PsiModifierListOwner element) { if (!myAnnotateLocalVariables){ if (element instanceof PsiLocalVariable) return true; if (element instanceof PsiParameter && ((PsiParameter)element).getDeclarationScope() instanceof PsiForeachStatement) return true; } return false; }