package jetbrains.mps.baseLanguageInternal.textGen; /*Generated by MPS */ import jetbrains.mps.text.rt.TextGenDescriptorBase; import jetbrains.mps.text.rt.TextGenContext; import jetbrains.mps.text.impl.TextGenSupport; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.baseLanguage.textGen.BaseClassConceptTextGen; import jetbrains.mps.lang.traceable.behavior.UnitConcept__BehaviorDescriptor; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; public class InternalAnonymousClass_TextGen extends TextGenDescriptorBase { @Override public void generateText(final TextGenContext ctx) { final TextGenSupport tgs = new TextGenSupport(ctx); tgs.createUnitInfo(); BaseLangInternal.className(SPropertyOperations.getString(ctx.getPrimaryInput(), MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x2f7b79225e746809L, 0x2f7b79225e7468e5L, "fqClassName")), ctx.getPrimaryInput(), ctx); if (ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x2f7b79225e746809L, 0x2f7b79225e74680dL, "typeParameter"))).isNotEmpty()) { tgs.append("<"); { Iterable<SNode> collection = SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x2f7b79225e746809L, 0x2f7b79225e74680dL, "typeParameter")); final SNode lastItem = Sequence.fromIterable(collection).last(); for (SNode item : collection) { tgs.appendNode(item); if (item != lastItem) { tgs.append(", "); } } } tgs.append(">"); } tgs.append("("); { Iterable<SNode> collection = SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x2f7b79225e746809L, 0x2f7b79225e74680cL, "constructorArgument")); final SNode lastItem = Sequence.fromIterable(collection).last(); for (SNode item : collection) { tgs.appendNode(item); if (item != lastItem) { tgs.append(", "); } } } tgs.append(")"); tgs.append(" "); BaseClassConceptTextGen.membersWithBrackets(ctx.getPrimaryInput(), false, ctx); if (tgs.needPositions()) { tgs.fillUnitInfo(UnitConcept__BehaviorDescriptor.getUnitName_id4pl5GY7LKmR.invoke(SNodeOperations.cast(ctx.getPrimaryInput(), MetaAdapterFactory.getInterfaceConcept(0x9ded098bad6a4657L, 0xbfd948636cfe8bc3L, 0x465516cf87c705a4L, "jetbrains.mps.lang.traceable.structure.UnitConcept")))); } } }