package jetbrains.mps.kotlin.typesystem;

/*Generated by MPS */

import jetbrains.mps.errors.QuickFix_Runtime;
import jetbrains.mps.smodel.SNodePointer;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SConcept;

public class FunctionCall_MoveLambdaOutOfParenthesis_QuickFix extends QuickFix_Runtime {
  public FunctionCall_MoveLambdaOutOfParenthesis_QuickFix() {
    super(new SNodePointer("r:aff09eac-afd3-4057-bdd8-e02a572d1436(jetbrains.mps.kotlin.typesystem)", "1837995998129641017"));
  }
  public String getDescription(SNode node) {
    return "Move lambda argument out of parentheses";
  }
  public void execute(SNode node) {
    SLinkOperations.setTarget(((SNode) FunctionCall_MoveLambdaOutOfParenthesis_QuickFix.this.getField("call")[0]), LINKS.lambda$U$kC, SNodeOperations.as(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(((SNode) FunctionCall_MoveLambdaOutOfParenthesis_QuickFix.this.getField("call")[0]), LINKS.arguments$zJyV)).last(), LINKS.expression$RzsN), CONCEPTS.LambdaLiteral$Bd));
    SNodeOperations.deleteNode(ListSequence.fromList(SLinkOperations.getChildren(((SNode) FunctionCall_MoveLambdaOutOfParenthesis_QuickFix.this.getField("call")[0]), LINKS.arguments$zJyV)).last());
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink lambda$U$kC = MetaAdapterFactory.getContainmentLink(0x6b3888c1980244d8L, 0x8baff8e6c33ed689L, 0x6186632f85a74c27L, 0x28bef6d7551af77dL, "lambda");
    /*package*/ static final SContainmentLink arguments$zJyV = MetaAdapterFactory.getContainmentLink(0x6b3888c1980244d8L, 0x8baff8e6c33ed689L, 0x5b1dd60162ecf00bL, 0x5b1dd60162ecf00cL, "arguments");
    /*package*/ static final SContainmentLink expression$RzsN = MetaAdapterFactory.getContainmentLink(0x6b3888c1980244d8L, 0x8baff8e6c33ed689L, 0x28bef6d7551af579L, 0x28bef6d7551af924L, "expression");
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept LambdaLiteral$Bd = MetaAdapterFactory.getConcept(0x6b3888c1980244d8L, 0x8baff8e6c33ed689L, 0x28bef6d7551af517L, "jetbrains.mps.kotlin.structure.LambdaLiteral");
  }
}
