String () { ASTNode treeNode = null; Block child = mySubBlocks.get(0); while (treeNode == null) { if (child instanceof AbstractBlock) { treeNode = ((AbstractBlock)child).getNode(); } else if (child instanceof SyntheticCodeBlock) { child = ((SyntheticCodeBlock)child).mySubBlocks.get(0); } else { break; } } final TextRange textRange = getTextRange(); if (treeNode != null) { PsiElement psi = treeNode.getPsi(); if (psi != null) { PsiFile file = psi.getContainingFile(); if (file != null) { return file.getText().subSequence(textRange.getStartOffset(), textRange.getEndOffset()) + " " + textRange; } } } return getClass().getName() + ": " + textRange; }