public String getFormattedText()
{
if ( getValue() == null) return null;
Reader r = new StringReader( (String) getValue() );
SeamTextLexer lexer = new SeamTextLexer(r);
SeamTextParser parser = new SeamTextParser(lexer);
try
{
parser.startRule();
}
catch (RecognitionException rex) {
// Log a nice message for any lexer/parser errors, users can disable this if they want to
log.warn( "Seam Text parse error: " + rex.getMessage() );
} catch (ANTLRException ex) {
// All other errors are fatal;
throw new RuntimeException(ex);
}
return parser.toString();
}