protected void generateIScriptBuilder ( ) { final List < StringConcatenationClient > topElements = generateTopElements ( true , false ) ; final TypeReference builder = getScriptBuilderInterface ( ) ; final StringConcatenationClient content = new StringConcatenationClient ( ) { @ Override protected void appendTo ( TargetStringConcatenation it ) { it . append ( "/** Builder of " + getLanguageName ( ) + " scripts." ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( " *" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( " * <p>This builder is provided for helping to create " //$NON-NLS-1$ + getLanguageName ( ) + " Ecore elements." ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( " *" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( " * <p>Do not forget to invoke {@link #finalizeScript()} for creating imports, etc." ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( " */" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "@SuppressWarnings(\"all\")" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "public interface " ) ; //$NON-NLS-1$ it . append ( builder . getSimpleName ( ) ) ; it . append ( " {" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( generateFieldsAndMethods ( true , false ) ) ; for ( final StringConcatenationClient element : topElements ) { it . append ( element ) ; } it . append ( "}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; } } ; final JavaFileAccess javaFile = getFileAccessFactory ( ) . createJavaFile ( builder , content ) ; javaFile . writeTo ( getSrcGen ( ) ) ; }
Generate the script builder interface .