docs: @SuppressWarnings("checkstyle:all")
  	protected void generateEcoreDocumentationBuilderImpl() {
  		final TypeReference builder = getEcoreDocumentationBuilderImpl();
  		StringConcatenationClient content = new StringConcatenationClient() {
  			@SuppressWarnings("synthetic-access")
  			@Override
  			protected void appendTo(TargetStringConcatenation it) {
  				it.append("/** Build a documentation string."); //$NON-NLS-1$
  				it.newLine();
  				it.append(" */"); //$NON-NLS-1$
  				it.newLine();
  				it.append("public class "); //$NON-NLS-1$
  				it.append(builder.getSimpleName());
  				it.append(" implements "); //$NON-NLS-1$
  				it.append(getIEcoreDocumentationBuilder());
  				it.append(" {"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate "); //$NON-NLS-1$
  				it.append(AbstractRule.class);
  				it.append(" mlRule;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate "); //$NON-NLS-1$
  				it.append(AbstractRule.class);
  				it.append(" slRule;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate String mlStartSymbols;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate String mlEndTagSymbols;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate String slStartSymbols;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Inject.class);
  				it.newLine();
  				it.append("\tprivate "); //$NON-NLS-1$
  				it.append(getIDocumentationFormatter());
  				it.append(" documentationFormatter;"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Inject.class);
  				it.newLine();
  				it.append("\tpublic void setGrammarAccess("); //$NON-NLS-1$
  				it.append(DocumentationBuilderFragment.this.grammarAccessExtensions.getGrammarAccess(getGrammar()));
  				it.append(" access) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tthis.mlRule = access.getML_COMMENTRule();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tthis.slRule = access.getSL_COMMENTRule();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tfor ("); //$NON-NLS-1$
  				it.append(AbstractElement.class);
  				it.append(" element : (("); //$NON-NLS-1$
  				it.append(Group.class);
  				it.append(") this.mlRule.getAlternatives()).getElements()) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tif (element instanceof "); //$NON-NLS-1$
  				it.append(Keyword.class);
  				it.append(" && "); //$NON-NLS-1$
  				it.append(Strings.class);
  				it.append(".isEmpty(this.mlStartSymbols)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tthis.mlStartSymbols = (("); //$NON-NLS-1$
  				it.append(Keyword.class);
  				it.append(") element).getValue();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t} else if (element instanceof "); //$NON-NLS-1$
  				it.append(UntilToken.class);
  				it.append(" && "); //$NON-NLS-1$
  				it.append(Strings.class);
  				it.append(".isEmpty(this.mlEndTagSymbols)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tthis.mlEndTagSymbols = (("); //$NON-NLS-1$
  				it.append(Keyword.class);
  				it.append(") (("); //$NON-NLS-1$
  				it.append(UntilToken.class);
  				it.append(") element).getTerminal()).getValue();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t"); //$NON-NLS-1$
  				it.append(AbstractRule.class);
  				it.append(" slRule = access.getSL_COMMENTRule();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tfor ("); //$NON-NLS-1$
  				it.append(AbstractElement.class);
  				it.append(" element : (("); //$NON-NLS-1$
  				it.append(Group.class);
  				it.append(") slRule.getAlternatives()).getElements()) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tif (element instanceof "); //$NON-NLS-1$
  				it.append(Keyword.class);
  				it.append(") {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tthis.slStartSymbols = (("); //$NON-NLS-1$
  				it.append(Keyword.class);
  				it.append(") element).getValue().trim();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tbreak;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Pure.class);
  				it.newLine();
  				it.append("\tpublic "); //$NON-NLS-1$
  				it.append(AbstractRule.class);
  				it.append(" getMLCommentRule() {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn this.mlRule;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Pure.class);
  				it.newLine();
  				it.append("\tpublic "); //$NON-NLS-1$
  				it.append(AbstractRule.class);
  				it.append(" getSLCommentRule() {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn this.slRule;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Pure.class);
  				it.newLine();
  				it.append("\tpublic "); //$NON-NLS-1$
  				it.append(getIDocumentationFormatter());
  				it.append(" getDocumentationFormatter() {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn this.documentationFormatter;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Pure.class);
  				it.newLine();
  				it.append("\tpublic boolean isMultilineCommentFor(Class<?> type) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn "); //$NON-NLS-1$
  				Set<String> multilineCommentedTypes = getCodeBuilderConfig().getMultilineCommentedTypes();
  				if (multilineCommentedTypes.isEmpty()) {
  					it.append("false"); //$NON-NLS-1$
  				} else {
  					boolean firstTest = true;
  					for (String typeName : multilineCommentedTypes) {
  						if (firstTest) {
  							firstTest = false;
  						} else {
  							it.newLine();
  							it.append("\t\t\t\t|| "); //$NON-NLS-1$
  						}
  						TypeReference reference = new TypeReference(typeName);
  						it.append(reference);
  						it.append(".class.isAssignableFrom(type)"); //$NON-NLS-1$
  					}
  				}
  				it.append(";"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\t@"); //$NON-NLS-1$
  				it.append(Pure.class);
  				it.newLine();
  				it.append("\tpublic String build(String doc, Class<?> objectType) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tString givenDocumentation = "); //$NON-NLS-1$
  				it.append(Strings.class);
  				it.append(".emptyIfNull(doc).trim();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tStringBuilder documentation = new StringBuilder();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t"); //$NON-NLS-1$
  				it.append(getIDocumentationFormatter());
  				it.append(" formatter = getDocumentationFormatter();"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tif (isMultilineCommentFor(objectType)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tif (!givenDocumentation.startsWith(this.mlStartSymbols)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tdocumentation.append(this.mlStartSymbols);"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tdocumentation.append(givenDocumentation);"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tif (!givenDocumentation.endsWith(this.mlEndTagSymbols)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\tdocumentation.append(this.mlEndTagSymbols);"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\treturn formatter.formatMultilineComment(documentation.toString());"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tdocumentation.append(\"\\n\");"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tif (!givenDocumentation.startsWith(this.slStartSymbols)) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tdocumentation.append(this.slStartSymbols);"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tdocumentation.append(givenDocumentation);"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tif (!givenDocumentation.isEmpty() && !isNewLine(givenDocumentation.charAt(givenDocumentation.length() - 1))) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\tdocumentation.append(\"\\n\");"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn formatter.formatSinglelineComment(documentation.toString());"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("\tprivate static boolean isNewLine(char character) {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\tif (character == '\\n' || character == '\\r' || character == '\\f') {"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\treturn true;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t}"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\treturn ((((1 << "); //$NON-NLS-1$
  				it.append(Character.class);
  				it.append(".LINE_SEPARATOR)"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t\t\t\t| (1 << "); //$NON-NLS-1$
  				it.append(Character.class);
  				it.append(".PARAGRAPH_SEPARATOR)) >> "); //$NON-NLS-1$
  				it.append(Character.class);
  				it.append(".getType((int) character)) & 1) != 0;"); //$NON-NLS-1$
  				it.newLine();
  				it.append("\t}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  				it.append("}"); //$NON-NLS-1$
  				it.newLineIfNotEmpty();
  				it.newLine();
  			}
  
  		};
  		JavaFileAccess createJavaFile = getFileAccessFactory().createJavaFile(builder, content);
  		createJavaFile.writeTo(getSrcGen());
  	}