PsiElement () { final PsiElement rBrace = myCodeBlock.getRBrace(); if (rBrace != null) { final PsiElement prevSibling = rBrace.getPrevSibling(); return prevSibling == myCodeBlock.getLBrace() ? null : prevSibling; } return getLastChild(); }