protected CharSequence _genText(final Ref ref) {
CharSequence _xblockexpression = null;
{
String _xifexpression = null;
Identifiable _ref = ref.getRef();
if ((_ref instanceof AbstractSection)) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("title=\"Go to "");
Identifiable _ref_1 = ref.getRef();
TextOrMarkup _title = ((AbstractSection) _ref_1).getTitle();
CharSequence _genPlainText = this.plaintext.genPlainText(_title);
_builder.append(_genPlainText, "");
_builder.append(""\"");
_xifexpression = _builder.toString();
}
final String title = _xifexpression;
StringConcatenation _builder_1 = new StringConcatenation();
{
EList<TextOrMarkup> _contents = ref.getContents();
boolean _isEmpty = _contents.isEmpty();
if (_isEmpty) {
_builder_1.append("<a href=\"");
Identifiable _ref_2 = ref.getRef();
String _fullPHPURL = this.naming.getFullPHPURL(_ref_2);
_builder_1.append(_fullPHPURL, "");
_builder_1.append("\" ");
_builder_1.append(title, "");
_builder_1.append(" >section ");
Identifiable _ref_3 = ref.getRef();
String _name = _ref_3.getName();
_builder_1.append(_name, "");
_builder_1.append("</a>");
} else {
_builder_1.append("<a href=\"");
Identifiable _ref_4 = ref.getRef();
String _fullPHPURL_1 = this.naming.getFullPHPURL(_ref_4);
_builder_1.append(_fullPHPURL_1, "");
_builder_1.append("\" ");
_builder_1.append(title, "");
_builder_1.append(">");