TextRange (@NotNull PsiClass aClass) { PsiElement lBrace = aClass.getLBrace(); if (lBrace == null) return null; PsiElement rBrace = aClass.getRBrace(); if (rBrace == null) return null; return new TextRange(lBrace.getTextOffset(), rBrace.getTextOffset() + 1); }