public void doGenerateText(SNode node) { if (getBuffer().hasPositionsSupport()) { TraceInfoGenerationUtil.createUnitInfo(this, node); } if ((AttributeOperations.getAttribute( node, new IAttributeDescriptor.NodeAttribute( "jetbrains.mps.baseLanguage.javadoc.structure.ClassifierDocComment")) != null)) { appendNode( AttributeOperations.getAttribute( node, new IAttributeDescriptor.NodeAttribute( "jetbrains.mps.baseLanguage.javadoc.structure.ClassifierDocComment"))); } BaseLanguageTextGen.fileHeader(node, this); BaseLanguageTextGen.annotations(node, this); BaseLanguageTextGen.visibilityWithIndent( SLinkOperations.getTarget(node, "visibility", true), this); if (Classifier_Behavior.call_isInner_521412098689998677(node) && BehaviorReflection.invokeVirtual( Boolean.TYPE, node, "virtual_isStatic_7405920559687241224", new Object[] {})) { this.append("static "); } if (SPropertyOperations.getBoolean(node, "abstractClass")) { this.append("abstract "); } if (SPropertyOperations.getBoolean(node, "isFinal")) { this.append("final "); } this.append("class "); this.append(SPropertyOperations.getString(node, "name")); GenericDeclarationTextGen2.typeDeclarations(node, this); if ((SLinkOperations.getTarget(node, "superclass", true) != null)) { this.append(" extends "); appendNode(SLinkOperations.getTarget(node, "superclass", true)); } if (ListSequence.fromList(SLinkOperations.getTargets(node, "implementedInterface", true)) .isNotEmpty()) { this.append(" implements "); { Iterable<SNode> collection = SLinkOperations.getTargets(node, "implementedInterface", true); final SNode lastItem = Sequence.fromIterable(collection).last(); for (SNode item : collection) { appendNode(item); if (item != lastItem) { append(", "); } } } } this.append(" "); BaseClassConceptTextGen.membersWithBrackets(node, true, this); this.appendNewLine(); if (getBuffer().hasPositionsSupport()) { { String unitName = null; try { unitName = BehaviorReflection.invokeVirtual( String.class, SNodeOperations.cast(node, "jetbrains.mps.lang.traceable.structure.UnitConcept"), "virtual_getUnitName_5067982036267369911", new Object[] {}); } catch (Throwable t) { if (LOG.isEnabledFor(Level.ERROR)) { LOG.error("Can't calculate unit name for a node " + node + ".", t); } } TraceInfoGenerationUtil.fillUnitInfo(this, node, unitName); } } }