public static String getSarlCodeFor ( EObject object ) { final ICompositeNode node = NodeModelUtils . getNode ( object ) ; if ( node != null ) { String text = node . getText ( ) ; if ( text != null ) { text = text . trim ( ) ; text = text . replaceAll ( "[\n\r\f]+" , " " ) ; //$NON-NLS-1$//$NON-NLS-2$ } return Strings . emptyToNull ( text ) ; } return null ; }
Replies the original code for the given Ecore object .