protected void generateScriptSourceAppender ( ) { final List < StringConcatenationClient > topElements = generateTopElements ( false , true ) ; final TypeReference appender = getCodeElementExtractor ( ) . getElementAppenderImpl ( "Script" ) ; //$NON-NLS-1$ final StringConcatenationClient content = new StringConcatenationClient ( ) { @ Override protected void appendTo ( TargetStringConcatenation it ) { it . append ( "/** Appender of " + getLanguageName ( ) + " scripts." ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( " *" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( " */" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "@SuppressWarnings(\"all\")" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "public class " ) ; //$NON-NLS-1$ it . append ( getScriptAppender ( ) . getSimpleName ( ) ) ; it . append ( " extends " ) ; //$NON-NLS-1$ it . append ( getCodeElementExtractor ( ) . getAbstractAppenderImpl ( ) ) ; it . append ( " implements " ) ; //$NON-NLS-1$ it . append ( getScriptBuilderInterface ( ) ) ; it . append ( " {" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( generateFieldsAndMethods ( false , true ) ) ; for ( final StringConcatenationClient element : topElements ) { it . append ( element ) ; } it . append ( "}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; } } ; final JavaFileAccess javaFile = getFileAccessFactory ( ) . createJavaFile ( appender , content ) ; javaFile . writeTo ( getSrcGen ( ) ) ; }
Generate the script appender .