package jetbrains.mps.lang.smodel.scripts;

/*Generated by MPS */

import jetbrains.mps.lang.script.runtime.BaseMigrationScript;
import jetbrains.mps.lang.script.runtime.AbstractMigrationRefactoring;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SEnumOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.behavior.SNodeOperation__BehaviorDescriptor;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.mps.openapi.model.SNodeReference;
import org.jetbrains.mps.openapi.persistence.PersistenceFacade;
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.SInterfaceConcept;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import org.jetbrains.mps.openapi.language.SReferenceLink;
import org.jetbrains.mps.openapi.language.SProperty;

public final class SModelLanguageEnhancements_Pointers_MigrationScript extends BaseMigrationScript {
  public SModelLanguageEnhancements_Pointers_MigrationScript() {
    super("SModel Lanugage Enhancements (node-ptr<> and model-ptr)");
    // whitespace
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace reference link assignment with `.set ptr` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace reference link assignment with `.set ptr` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.AssignmentExpression$SE;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return SEnumOperations.isMember(SPropertyOperations.getEnum(SLinkOperations.getTarget(SNodeOperations.as(SLinkOperations.getTarget(SNodeOperations.as(SLinkOperations.getTarget(node, LINKS.lValue$splI), CONCEPTS.DotExpression$yW), LINKS.operation$gs9E), CONCEPTS.SLinkAccess$Pk), LINKS.link$zuOT), PROPS.metaClass$PeKc), 0xfc6f4e95b8L) && SNodeOperations.isInstanceOf(SLinkOperations.getTarget(node, LINKS.rValue$spNK), CONCEPTS.AbstractNodeRefExpression$M3);
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNode linkAccessExpression = SLinkOperations.getTarget(node, LINKS.lValue$splI);
        SNode targetNodeIdentity = NodePointerMigrations.toNodeIdentity(SNodeOperations.cast(SLinkOperations.getTarget(node, LINKS.rValue$spNK), CONCEPTS.AbstractNodeRefExpression$M3));
        SNode replacement = createDotExpression_y8o86o_a0c0a4(linkAccessExpression, targetNodeIdentity);
        SNodeOperations.replaceWithAnother(node, replacement);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `.set` with `.set ptr` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `.set` with `.set ptr` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.Link_SetTargetOperation$Mn;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return SEnumOperations.isMember(SPropertyOperations.getEnum(SLinkOperations.getTarget(SNodeOperations.as(SNodeOperation__BehaviorDescriptor.getLeftExpressionOperation_idhEwJdHi.invoke(node), CONCEPTS.SLinkAccess$Pk), LINKS.link$zuOT), PROPS.metaClass$PeKc), 0xfc6f4e95b8L) && SNodeOperations.isInstanceOf(SLinkOperations.getTarget(node, LINKS.linkTarget$tLt0), CONCEPTS.AbstractNodeRefExpression$M3);
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNode targetNodeIdentity = NodePointerMigrations.toNodeIdentity(SNodeOperations.cast(SLinkOperations.getTarget(node, LINKS.linkTarget$tLt0), CONCEPTS.AbstractNodeRefExpression$M3));
        SNode replacement = createLink_SetTargetPointerOperation_y8o86o_a0b0a5(targetNodeIdentity);
        SNodeOperations.replaceWithAnother(node, replacement);
      }
      @Override
      public boolean isShowAsIntention() {
        return false;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `==` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `==` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.EqualsExpression$MF;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `==` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `==` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.EqualsExpression$MF;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `!=` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `!=` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NotEqualsExpression$aX;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `!=` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `!=` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NotEqualsExpression$aX;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:eq:` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:eq:` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPEEqualsExpression$Ey;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:eq:` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:eq:` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPEEqualsExpression$Ey;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:ne:` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:ne:` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPENotEqualsExpression$Ef;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:ne:` with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:ne:` with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPENotEqualsExpression$Ef;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace reference link assigment and quotation with `.set ptr` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace reference link assigment and quotation with `.set ptr` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.AssignmentExpression$SE;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return SEnumOperations.isMember(SPropertyOperations.getEnum(SLinkOperations.getTarget(SNodeOperations.as(SLinkOperations.getTarget(SNodeOperations.as(SLinkOperations.getTarget(node, LINKS.lValue$splI), CONCEPTS.DotExpression$yW), LINKS.operation$gs9E), CONCEPTS.SLinkAccess$Pk), LINKS.link$zuOT), PROPS.metaClass$PeKc), 0xfc6f4e95b8L) && NodePointerMigrations.isQuotationSuitForNodePointer(SLinkOperations.getTarget(node, LINKS.rValue$spNK));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNode linkAccessExpression = SLinkOperations.getTarget(node, LINKS.lValue$splI);
        SNode targetNodeIdentity = NodePointerMigrations.quotationToNodeIdentity(SLinkOperations.getTarget(node, LINKS.rValue$spNK));
        SNode replacement = createDotExpression_y8o86o_a0c0a91(linkAccessExpression, targetNodeIdentity);
        SNodeOperations.replaceWithAnother(node, replacement);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `.set` and quotation with `.set ptr` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `.set` and quotation with `.set ptr` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.Link_SetTargetOperation$Mn;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return SEnumOperations.isMember(SPropertyOperations.getEnum(SLinkOperations.getTarget(SNodeOperations.as(SNodeOperation__BehaviorDescriptor.getLeftExpressionOperation_idhEwJdHi.invoke(node), CONCEPTS.SLinkAccess$Pk), LINKS.link$zuOT), PROPS.metaClass$PeKc), 0xfc6f4e95b8L) && NodePointerMigrations.isQuotationSuitForNodePointer(SLinkOperations.getTarget(node, LINKS.linkTarget$tLt0));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNode targetNodeIdentity = NodePointerMigrations.quotationToNodeIdentity(SLinkOperations.getTarget(node, LINKS.linkTarget$tLt0));
        SNode replacement = createLink_SetTargetPointerOperation_y8o86o_a0b0a02(targetNodeIdentity);
        SNodeOperations.replaceWithAnother(node, replacement);
      }
      @Override
      public boolean isShowAsIntention() {
        return false;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `==` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `==` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.EqualsExpression$MF;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `==` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `==` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.EqualsExpression$MF;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `!=` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `!=` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NotEqualsExpression$aX;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `!=` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `!=` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NotEqualsExpression$aX;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:eq:` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:eq:` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPEEqualsExpression$Ey;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:eq:` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:eq:` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPEEqualsExpression$Ey;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:ne:` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:ne:` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPENotEqualsExpression$Ef;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.leftExpression$sEj), SLinkOperations.getTarget(node, LINKS.rightExpression$nvX)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace `:ne:` and quotation with `.is` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace `:ne:` and quotation with `.is` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.NPENotEqualsExpression$Ef;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isValidForEquality_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        SNodeOperations.replaceWithAnother(node, NodePointerMigrations.getNotEqualityReplacement_Quotation(SLinkOperations.getTarget(node, LINKS.rightExpression$nvX), SLinkOperations.getTarget(node, LINKS.leftExpression$sEj)));
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    // whitespace
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace downcast and SNode#getReference method call with `.pointer` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace downcast and SNode#getReference method call with `.pointer` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.DotExpression$yW;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isDowncastToGetReferenceMethod_Node(node) && NodePointerMigrations.isSafeToReplace(node);
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        NodePointerMigrations.replaceDowncastToGetReferenceMethod_Node(node);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace downcast and SNode#getReference method call with `.pointer` operation (may lead typesystem errors)";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace downcast and SNode#getReference method call with `.pointer` operation (may lead typesystem errors)";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.DotExpression$yW;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isDowncastToGetReferenceMethod_Node(node) && !(NodePointerMigrations.isSafeToReplace(node));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        NodePointerMigrations.replaceDowncastToGetReferenceMethod_Node(node);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
    // whitespace
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace downcast and SModel#getReference method call with `.pointer` operation";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace downcast and SModel#getReference method call with `.pointer` operation";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.DotExpression$yW;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isDowncastToGetReferenceMethod_Model(node) && NodePointerMigrations.isSafeToReplace(node);
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        NodePointerMigrations.replaceDowncastToGetReferenceMethod_Model(node);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    this.addRefactoring(new AbstractMigrationRefactoring() {
      @Override
      public String getName() {
        return "Replace downcast and SModel#getReference method call with `.pointer` operation (may lead typesystem errors)";
      }
      @Override
      public String getAdditionalInfo() {
        return "Replace downcast and SModel#getReference method call with `.pointer` operation (may lead typesystem errors)";
      }
      @Override
      public SAbstractConcept getApplicableConcept() {
        return CONCEPTS.DotExpression$yW;
      }
      @Override
      public boolean isApplicableInstanceNode(SNode node) {
        return NodePointerMigrations.isDowncastToGetReferenceMethod_Model(node) && !(NodePointerMigrations.isSafeToReplace(node));
      }
      @Override
      public void doUpdateInstanceNode(SNode node) {
        NodePointerMigrations.replaceDowncastToGetReferenceMethod_Model(node);
      }
      @Override
      public boolean isShowAsIntention() {
        return true;
      }
    });
    // whitespace
  }

  @Nullable
  @Override
  public SNodeReference getScriptNode() {
    return PersistenceFacade.getInstance().createNodeReference("r:00000000-0000-4000-0000-011c89590300(jetbrains.mps.lang.smodel.scripts)/1693197062082143330");
  }
  private static SNode createDotExpression_y8o86o_a0c0a4(SNode p0, SNode p1) {
    SNodeBuilder n0 = new SNodeBuilder().init(CONCEPTS.DotExpression$yW);
    n0.forChild(LINKS.operand$w6IR).initNode(p0, CONCEPTS.Expression$mB, true);
    {
      SNodeBuilder n1 = n0.forChild(LINKS.operation$gs9E).init(CONCEPTS.Link_SetTargetPointerOperation$6D);
      {
        SNodeBuilder n2 = n1.forChild(LINKS.linkTarget$BrA0).init(CONCEPTS.NodePointerArg_Identity$75);
        n2.forChild(LINKS.ref$U7VA).initNode(p1, CONCEPTS.NodeIdentity$8R, true);
      }
    }
    return n0.getResult();
  }
  private static SNode createLink_SetTargetPointerOperation_y8o86o_a0b0a5(SNode p0) {
    SNodeBuilder n0 = new SNodeBuilder().init(CONCEPTS.Link_SetTargetPointerOperation$6D);
    {
      SNodeBuilder n1 = n0.forChild(LINKS.linkTarget$BrA0).init(CONCEPTS.NodePointerArg_Identity$75);
      n1.forChild(LINKS.ref$U7VA).initNode(p0, CONCEPTS.NodeIdentity$8R, true);
    }
    return n0.getResult();
  }
  private static SNode createDotExpression_y8o86o_a0c0a91(SNode p0, SNode p1) {
    SNodeBuilder n0 = new SNodeBuilder().init(CONCEPTS.DotExpression$yW);
    n0.forChild(LINKS.operand$w6IR).initNode(p0, CONCEPTS.Expression$mB, true);
    {
      SNodeBuilder n1 = n0.forChild(LINKS.operation$gs9E).init(CONCEPTS.Link_SetTargetPointerOperation$6D);
      {
        SNodeBuilder n2 = n1.forChild(LINKS.linkTarget$BrA0).init(CONCEPTS.NodePointerArg_Identity$75);
        n2.forChild(LINKS.ref$U7VA).initNode(p1, CONCEPTS.NodeIdentity$8R, true);
      }
    }
    return n0.getResult();
  }
  private static SNode createLink_SetTargetPointerOperation_y8o86o_a0b0a02(SNode p0) {
    SNodeBuilder n0 = new SNodeBuilder().init(CONCEPTS.Link_SetTargetPointerOperation$6D);
    {
      SNodeBuilder n1 = n0.forChild(LINKS.linkTarget$BrA0).init(CONCEPTS.NodePointerArg_Identity$75);
      n1.forChild(LINKS.ref$U7VA).initNode(p0, CONCEPTS.NodeIdentity$8R, true);
    }
    return n0.getResult();
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept AssignmentExpression$SE = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e96L, "jetbrains.mps.baseLanguage.structure.AssignmentExpression");
    /*package*/ static final SConcept AbstractNodeRefExpression$M3 = MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x319fd776da5d8e3cL, "jetbrains.mps.lang.smodel.structure.AbstractNodeRefExpression");
    /*package*/ static final SConcept DotExpression$yW = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, "jetbrains.mps.baseLanguage.structure.DotExpression");
    /*package*/ static final SConcept SLinkAccess$Pk = MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x108f96ea2caL, "jetbrains.mps.lang.smodel.structure.SLinkAccess");
    /*package*/ static final SConcept Link_SetTargetOperation$Mn = MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1099887af60L, "jetbrains.mps.lang.smodel.structure.Link_SetTargetOperation");
    /*package*/ static final SConcept EqualsExpression$MF = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b210L, "jetbrains.mps.baseLanguage.structure.EqualsExpression");
    /*package*/ static final SConcept NotEqualsExpression$aX = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf9e20e303fL, "jetbrains.mps.baseLanguage.structure.NotEqualsExpression");
    /*package*/ static final SConcept NPEEqualsExpression$Ey = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11d47dc0e3bL, "jetbrains.mps.baseLanguage.structure.NPEEqualsExpression");
    /*package*/ static final SConcept NPENotEqualsExpression$Ef = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11d47db1c91L, "jetbrains.mps.baseLanguage.structure.NPENotEqualsExpression");
    /*package*/ static final SConcept Expression$mB = MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL, "jetbrains.mps.baseLanguage.structure.Expression");
    /*package*/ static final SConcept Link_SetTargetPointerOperation$6D = MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0xd13da596bcfef4eL, "jetbrains.mps.lang.smodel.structure.Link_SetTargetPointerOperation");
    /*package*/ static final SConcept NodePointerArg_Identity$75 = MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x2e154e2e58d91ebdL, "jetbrains.mps.lang.smodel.structure.NodePointerArg_Identity");
    /*package*/ static final SInterfaceConcept NodeIdentity$8R = MetaAdapterFactory.getInterfaceConcept(0x446c26eb2b7b4bf0L, 0x9b35f83fa582753eL, 0x502fe7548a208f7L, "jetbrains.mps.lang.modelapi.structure.NodeIdentity");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink rValue$spNK = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11b0d00332cL, 0xf8c77f1e99L, "rValue");
    /*package*/ static final SContainmentLink lValue$splI = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11b0d00332cL, 0xf8c77f1e97L, "lValue");
    /*package*/ static final SContainmentLink operation$gs9E = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation");
    /*package*/ static final SReferenceLink link$zuOT = MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x108f96ea2caL, 0x108f974549cL, "link");
    /*package*/ static final SContainmentLink linkTarget$tLt0 = MetaAdapterFactory.getContainmentLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1099887af60L, 0x1099887af61L, "linkTarget");
    /*package*/ static final SContainmentLink leftExpression$sEj = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbdeb6fecfL, 0xfbdeb7a11cL, "leftExpression");
    /*package*/ static final SContainmentLink rightExpression$nvX = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbdeb6fecfL, 0xfbdeb7a11bL, "rightExpression");
    /*package*/ static final SContainmentLink operand$w6IR = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand");
    /*package*/ static final SContainmentLink linkTarget$BrA0 = MetaAdapterFactory.getContainmentLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0xd13da596bcfef4eL, 0xd13da596bcfef4fL, "linkTarget");
    /*package*/ static final SContainmentLink ref$U7VA = MetaAdapterFactory.getContainmentLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x2e154e2e58d91ebdL, 0x2e154e2e58d91f06L, "ref");
  }

  private static final class PROPS {
    /*package*/ static final SProperty metaClass$PeKc = MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass");
  }
}
