TextRange (@NotNull PsiElement element) { PsiElement nextSibling = element.getNextSibling(); TextRange range = element.getTextRange(); if (PsiUtil.isJavaToken(nextSibling, JavaTokenType.SEMICOLON)) { return range.grown(1); } return range; }