ASTNode () { StartMarker rootMarker = prepareLightTree(); boolean possiblyTooDeep = myFile != null && BlockSupport.isTooDeep(myFile.getOriginalFile()); if (myOriginalTree != null && !possiblyTooDeep) { DiffLog diffLog = merge(myOriginalTree, rootMarker, myLastCommittedText); throw new BlockSupport.ReparsedSuccessfullyException(diffLog); } TreeElement rootNode = createRootAST(rootMarker); bind(rootMarker, (CompositeElement)rootNode); if (possiblyTooDeep && !(rootNode instanceof FileElement)) { ASTNode childNode = rootNode.getFirstChildNode(); if (childNode != null) { childNode.putUserData(BlockSupport.TREE_DEPTH_LIMIT_EXCEEDED, Boolean.TRUE); } } if (rootNode.getTextLength() != myText.length()) { LOG.error("Inconsistent root node. " + "; node type: " + rootNode.getElementType() + "; text length: " + myText.length() + "; node length: " + rootNode.getTextLength() + "; partial text: " + StringUtil.shortenTextWithEllipsis(myText.toString(), 512, 256) + "; partial node text: " + StringUtil.shortenTextWithEllipsis(rootNode.getText(), 512, 256) ); } return rootNode; }