boolean (PsiIfStatement ifStatement) { final PsiStatement elseBranch = ifStatement.getElseBranch(); if (elseBranch == null) return false; if (elseBranch instanceof PsiIfStatement) { return hasDefaultElse((PsiIfStatement)elseBranch); } else { return true; } }