package jetbrains.mps.lang.editor.diagram.generator.template.util;

/*Generated by MPS */

import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.baseLanguage.behavior.ClassConcept__BehaviorDescriptor;
import jetbrains.mps.lang.editor.figures.behavior.FigureAttribute__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SReferenceLink;

public class FigureUtils {
  public static boolean isMovable(SNode figureReference) {
    return SNodeOperations.isInstanceOf(figureReference, CONCEPTS.AttributedFigureReference$Zo) && ListSequence.fromList(ClassConcept__BehaviorDescriptor.getAllSuperClassifiers_id4fAeKISQjDi.invoke(FigureAttribute__BehaviorDescriptor.getFigureClass_id4H19mAwT6pg.invoke(SLinkOperations.getTarget(SNodeOperations.cast(figureReference, CONCEPTS.AttributedFigureReference$Zo), LINKS.figureAttribute$EOJr)))).contains(SNodeOperations.getNode("r:05147575-afa1-4d0f-b2e0-f20b32ad3e33(jetbrains.mps.lang.editor.diagram.runtime.jetpad.views)", "8082246476498952649"));
  }

  public static boolean isResizable(SNode figureReference) {
    return SNodeOperations.isInstanceOf(figureReference, CONCEPTS.AttributedFigureReference$Zo) && ListSequence.fromList(ClassConcept__BehaviorDescriptor.getAllSuperClassifiers_id4fAeKISQjDi.invoke(FigureAttribute__BehaviorDescriptor.getFigureClass_id4H19mAwT6pg.invoke(SLinkOperations.getTarget(SNodeOperations.cast(figureReference, CONCEPTS.AttributedFigureReference$Zo), LINKS.figureAttribute$EOJr)))).contains(SNodeOperations.getNode("r:05147575-afa1-4d0f-b2e0-f20b32ad3e33(jetbrains.mps.lang.editor.diagram.runtime.jetpad.views)", "7493754406620213986"));
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept AttributedFigureReference$Zo = MetaAdapterFactory.getConcept(0x6106f6117a7442d1L, 0x80deedc5c602bfd1L, 0x4b412569a095b4ceL, "jetbrains.mps.lang.editor.diagram.structure.AttributedFigureReference");
  }

  private static final class LINKS {
    /*package*/ static final SReferenceLink figureAttribute$EOJr = MetaAdapterFactory.getReferenceLink(0x6106f6117a7442d1L, 0x80deedc5c602bfd1L, 0x4b412569a095b4ceL, 0x4b412569a0e43041L, "figureAttribute");
  }
}
