package jetbrains.mps.lang.modelapi.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.modelapi.behavior.ModelName__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import org.jetbrains.mps.openapi.model.SModelName;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SContainmentLink;

public class UpdateModelPointerName_QuickFix extends QuickFix_Runtime {
  public UpdateModelPointerName_QuickFix() {
    super(new SNodePointer("r:66a90408-763b-417f-b164-4efaf06432ea(jetbrains.mps.lang.modelapi.typesystem)", "2510235753679627864"));
  }
  public String getDescription(SNode node) {
    return "Update model name to reflect actual value";
  }
  public void execute(SNode node) {
    ModelName__BehaviorDescriptor.updateValue_id2bm9xT0zPoJ.invoke(SLinkOperations.getTarget(SNodeOperations.as(node, CONCEPTS.ModelPointer$6N), LINKS.name$a8CF), ((SModelName) UpdateModelPointerName_QuickFix.this.getField("actualName")[0]));
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept ModelPointer$6N = MetaAdapterFactory.getConcept(0x446c26eb2b7b4bf0L, 0x9b35f83fa582753eL, 0x502fe7548a0e360L, "jetbrains.mps.lang.modelapi.structure.ModelPointer");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink name$a8CF = MetaAdapterFactory.getContainmentLink(0x446c26eb2b7b4bf0L, 0x9b35f83fa582753eL, 0x502fe7548a0e360L, 0x96ca5405afc2bccL, "name");
  }
}
