IteratorDeclaration (PsiLoopStatement statement) { if(statement instanceof PsiWhileStatement) { return fromWhileLoop((PsiWhileStatement)statement); } if(statement instanceof PsiForStatement) { return fromForLoop((PsiForStatement)statement); } return null; }