TextContent (PsiElement root, TextContent.TextDomain domain) { ElementManipulator<PsiElement> manipulator = ElementManipulators.getManipulator(root); int length = root.getTextLength(); if (manipulator != null) { TextRange valueRange = manipulator.getRangeInElement(root); if (isWrongRange(valueRange, length)) { PluginException.logPluginError(LOG, "The manipulator returned an incorrect range " + valueRange + " for PSI " + root.getClass() + " of length " + length, null, manipulator.getClass()); return null; } return build(root, domain, valueRange); } return build(root, domain, new TextRange(0, length)); }