public String getPrefix ( INode prefixNode ) { if ( prefixNode instanceof ILeafNode ) { if ( ( ( ILeafNode ) prefixNode ) . isHidden ( ) && prefixNode . getGrammarElement ( ) != null ) return "" ; return getNodeTextUpToCompletionOffset ( prefixNode ) ; } StringBuilder result = new StringBuilder ( prefixNode . getTotalLength ( ) ) ; doComputePrefix ( ( ICompositeNode ) prefixNode , result ) ; return result . toString ( ) ; }
replace region length