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;
public class InternalStaticMethodCall_TextGen extends TextGenDescriptorBase {
@Override
public void generateText(final TextGenContext ctx) {
final TextGenSupport tgs = new TextGenSupport(ctx);
BaseLangInternal.className(SPropertyOperations.getString(ctx.getPrimaryInput(), MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x1115767a8eeL, "fqClassName")), ctx.getPrimaryInput(), ctx);
tgs.append(".");
if (ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x11783518207L, "typeParameter"))).isNotEmpty()) {
tgs.append("<");
{
Iterable<SNode> collection = SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x11783518207L, "typeParameter"));
final SNode lastItem = Sequence.fromIterable(collection).last();
for (SNode item : collection) {
tgs.appendNode(item);
if (item != lastItem) {
tgs.append(", ");
}
}
}
tgs.append(">");
}
tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x111576710b3L, "methodName")));
tgs.append("(");
{
Iterable<SNode> collection = SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x46d6451be652f35L, "actualArgument"));
final SNode lastItem = Sequence.fromIterable(collection).last();
for (SNode item : collection) {
tgs.appendNode(item);
if (item != lastItem) {
tgs.append(", ");
}
}
}
tgs.append(")");
}
}