StringConcatenation _builder = new StringConcatenation();
_builder.append("<span class=\"inlinecode\">");
EList<EObject> _contents = cb.getContents();
EObject _head = IterableExtensions.<EObject>head(_contents);
CharSequence _generateCode = this.generateCode(((Code) _head));
LangDef _language = cb.getLanguage();
String _formatCode = this.utils.formatCode(_generateCode, _language);
_builder.append(_formatCode, "");
_builder.append("</span>");
_xifexpression = _builder;
} else {
CharSequence _xblockexpression = null;
{
final int indentToRemove = this.utils.calcIndent(cb);
Iterable<EObject> _xifexpression_1 = null;
EList<EObject> _contents_1 = cb.getContents();
int _size = _contents_1.size();
boolean _greaterThan = (_size > 2);
if (_greaterThan) {
EList<EObject> _contents_2 = cb.getContents();
Iterable<EObject> _tail = IterableExtensions.<EObject>tail(_contents_2);
EList<EObject> _contents_3 = cb.getContents();
int _size_1 = _contents_3.size();
int _minus = (_size_1 - 2);
_xifexpression_1 = IterableExtensions.<EObject>take(_tail, _minus);
} else {
_xifexpression_1 = Collections.EMPTY_LIST;
}
final Iterable<EObject> list = _xifexpression_1;
EList<EObject> _contents_4 = cb.getContents();
EObject _head_1 = IterableExtensions.<EObject>head(_contents_4);
CharSequence _generateCode_1 = this.generateCode(_head_1);
String _trimLines = this.trimLines(_generateCode_1, indentToRemove);
final String first = _trimLines.replaceAll("\\A(\\s*\n)*", "");
String _xifexpression_2 = null;
EList<EObject> _contents_5 = cb.getContents();
EObject _last = IterableExtensions.<EObject>last(_contents_5);
EList<EObject> _contents_6 = cb.getContents();
EObject _head_2 = IterableExtensions.<EObject>head(_contents_6);
boolean _notEquals = (!Objects.equal(_last, _head_2));
if (_notEquals) {
EList<EObject> _contents_7 = cb.getContents();
EObject _last_1 = IterableExtensions.<EObject>last(_contents_7);
CharSequence _generateCode_2 = this.generateCode(_last_1);
String _trimLines_1 = this.trimLines(_generateCode_2, indentToRemove);
_xifexpression_2 = _trimLines_1.replaceAll("(\\s*\n)*\\Z", "");
} else {
String _xblockexpression_1 = null;
{
first.replaceAll("(\\s*\n)*\\Z", "");
_xblockexpression_1 = "";
}
_xifexpression_2 = _xblockexpression_1;
}
final String last = _xifexpression_2;
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("<div class=\"literallayout\">");
_builder_1.newLine();
_builder_1.append("<div class=\"incode\">");
_builder_1.newLine();
_builder_1.append("<p class=\"code\">");
_builder_1.newLine();
LangDef _language_1 = cb.getLanguage();
String _formatCode_1 = this.utils.formatCode(first, _language_1);
_builder_1.append(_formatCode_1, "");
_builder_1.newLineIfNotEmpty();
{
for(final EObject code : list) {
CharSequence _generateCode_3 = this.generateCode(code);
String _trimLines_2 = this.trimLines(_generateCode_3, indentToRemove);
LangDef _language_2 = cb.getLanguage();
String _formatCode_2 = this.utils.formatCode(_trimLines_2, _language_2);
_builder_1.append(_formatCode_2, "");
_builder_1.newLineIfNotEmpty();
}
}
LangDef _language_3 = cb.getLanguage();
String _formatCode_3 = this.utils.formatCode(last, _language_3);
_builder_1.append(_formatCode_3, "");
_builder_1.newLineIfNotEmpty();
_builder_1.append("</p>");
_builder_1.newLine();