package jetbrains.mps.lang.core.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.ChildAttribute__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;

public class fix_ChildAttribute_name_QuickFix extends QuickFix_Runtime {
  public fix_ChildAttribute_name_QuickFix() {
    super(new SNodePointer("r:cec599e3-51d2-48a7-af31-989e3cbd593c(jetbrains.mps.lang.core.typesystem)", "6063712545515840164"));
  }
  public String getDescription(SNode node) {
    return "Change name to \"" + ChildAttribute__BehaviorDescriptor.getLink_idBpxLfMirzf.invoke(SNodeOperations.as(node, CONCEPTS.ChildAttribute$m8)).getName() + "\"";
  }
  public void execute(SNode node) {
    SNode linkAttribute = SNodeOperations.as(node, CONCEPTS.ChildAttribute$m8);
    SPropertyOperations.assign(linkAttribute, PROPS.role_DebugInfo$eLVf, ChildAttribute__BehaviorDescriptor.getLink_idBpxLfMirzf.invoke(linkAttribute).getName());
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept ChildAttribute$m8 = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x9d98713f247885aL, "jetbrains.mps.lang.core.structure.ChildAttribute");
  }

  private static final class PROPS {
    /*package*/ static final SProperty role_DebugInfo$eLVf = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x9d98713f247885aL, 0x9d98713f249b585L, "role_DebugInfo");
  }
}
