package jetbrains.mps.lang.editor.editorTest.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.core.behavior.BaseConcept__BehaviorDescriptor;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.smodel.builder.SNodeBuilder;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import org.jetbrains.mps.openapi.language.SProperty;

public class QuickFixApplied_QuickFix extends QuickFix_Runtime {
  public QuickFixApplied_QuickFix() {
    super(new SNodePointer("r:3b4c6266-b03b-4213-a8e8-189fda2aa77c(jetbrains.mps.lang.editor.editorTest.typesystem)", "8036481050509014080"));
  }
  public String getDescription(SNode node) {
    return "Apply quick fix to " + BaseConcept__BehaviorDescriptor.getPresentation_idhEwIMiw.invoke(node);
  }
  public void execute(SNode node) {
    SNode res = createQuickFixResolution_b6tyvt_a0a0c(((String) QuickFixApplied_QuickFix.this.getField("message")[0]));
    ListSequence.fromList(SLinkOperations.getChildren(SNodeOperations.cast(node, CONCEPTS.QuickFixStatement$LB), LINKS.resolution$5SLj)).addElement(res);
  }
  private static SNode createQuickFixResolution_b6tyvt_a0a0c(String p0) {
    SNodeBuilder n0 = new SNodeBuilder().init(CONCEPTS.QuickFixResolution$vb);
    n0.setProperty(PROPS.message$Dtfd, p0);
    return n0.getResult();
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept QuickFixStatement$LB = MetaAdapterFactory.getConcept(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x6f8750efb3b35c46L, "jetbrains.mps.lang.editor.editorTest.structure.QuickFixStatement");
    /*package*/ static final SConcept QuickFixResolution$vb = MetaAdapterFactory.getConcept(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x6f8750efb3c02480L, "jetbrains.mps.lang.editor.editorTest.structure.QuickFixResolution");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink resolution$5SLj = MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x6f8750efb3b35c46L, 0x6f8750efb3c03c17L, "resolution");
  }

  private static final class PROPS {
    /*package*/ static final SProperty message$Dtfd = MetaAdapterFactory.getProperty(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x6f8750efb3c02480L, 0x6f8750efb3c02481L, "message");
  }
}
