package jetbrains.mps.lang.structure.editor;

/*Generated by MPS */

import jetbrains.mps.nodeEditor.menus.transformation.TransformationMenuBase;
import java.util.Set;
import jetbrains.mps.internal.collections.runtime.SetSequence;
import java.util.HashSet;
import jetbrains.mps.lang.editor.menus.transformation.MenuLocations;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jetbrains.mps.openapi.editor.menus.transformation.TransformationMenuItem;
import jetbrains.mps.openapi.editor.menus.transformation.TransformationMenuContext;
import jetbrains.mps.lang.editor.menus.EditorMenuDescriptorBase;
import jetbrains.mps.smodel.SNodePointer;
import jetbrains.mps.lang.editor.menus.MenuPart;
import java.util.ArrayList;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.editor.menus.GroupMenuPart;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import java.util.Arrays;
import jetbrains.mps.lang.editor.menus.SingleItemMenuPart;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.logging.Logger;
import jetbrains.mps.openapi.editor.menus.transformation.ActionItemBase;
import jetbrains.mps.openapi.editor.menus.EditorMenuTraceInfo;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.kernel.language.ConceptAspectsHelper;
import jetbrains.mps.smodel.LanguageAspect;
import jetbrains.mps.smodel.action.SNodeFactoryOperations;
import jetbrains.mps.internal.collections.runtime.Sequence;
import jetbrains.mps.lang.structure.behavior.AbstractConceptDeclaration__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModuleOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SEnumOperations;
import jetbrains.mps.editor.runtime.selection.SelectionUtil;
import jetbrains.mps.editor.runtime.cells.CellIdManager;
import jetbrains.mps.smodel.builder.SNodeBuilder;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;
import org.jetbrains.mps.openapi.language.SConcept;
import org.jetbrains.mps.openapi.language.SInterfaceConcept;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import org.jetbrains.mps.openapi.language.SReferenceLink;

public class ConceptDeclaration_TransformationMenu extends TransformationMenuBase {
  private final Set<String> myLocations = SetSequence.fromSetAndArray(new HashSet<String>(), MenuLocations.CONTEXT_ASSISTANT);
  @Override
  public boolean isApplicableToLocation(@NotNull String location) {
    return SetSequence.fromSet(myLocations).contains(location);
  }

  @NotNull
  @Override
  public List<TransformationMenuItem> createMenuItems(@NotNull TransformationMenuContext context) {
    context.getEditorMenuTrace().pushTraceInfo();
    context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("default transformation menu for " + "ConceptDeclaration", new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "2299504936702472506")));
    try {
      return super.createMenuItems(context);
    } finally {
      context.getEditorMenuTrace().popTraceInfo();
    }
  }

  @Override
  @NotNull
  protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
    List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
    if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ASSISTANT).contains(_context.getMenuLocation())) {
      result.add(new TMP_Group_dubn3u_a0());
    }
    return result;
  }

  public class TMP_Group_dubn3u_a0 extends GroupMenuPart<TransformationMenuItem, TransformationMenuContext> {
    public TMP_Group_dubn3u_a0() {
      super(new EditorMenuDescriptorBase("transformation menu group", new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "8887077936720600560")));
    }
    @Override
    protected boolean isApplicable(TransformationMenuContext _context) {
      // suppressing assistant for incomplete concept / BaseConcept
      return SPropertyOperations.getString(_context.getNode(), PROPS.name$MnvL) != null && !(SNodeOperations.is(_context.getNode(), new SNodePointer("r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)", "1133920641626")));
    }
    @Override
    protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts() {
      return Arrays.<MenuPart<TransformationMenuItem, TransformationMenuContext>>asList(new TMP_Group_dubn3u_a0a(), new TMP_Action_dubn3u_b0a(), new TMP_Group_dubn3u_c0a());
    }
    public class TMP_Group_dubn3u_a0a extends GroupMenuPart<TransformationMenuItem, TransformationMenuContext> {
      public TMP_Group_dubn3u_a0a() {
        super(new EditorMenuDescriptorBase("transformation menu group", new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "8887077936720622571")));
      }
      @Override
      protected boolean isApplicable(TransformationMenuContext _context) {
        return _context.getEditorContext().getEditorPanelManager() != null;
      }
      @Override
      protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts() {
        return Arrays.<MenuPart<TransformationMenuItem, TransformationMenuContext>>asList(new TMP_Action_dubn3u_a0a0(), new TMP_Action_dubn3u_b0a0());
      }
      private class TMP_Action_dubn3u_a0a0 extends SingleItemMenuPart<TransformationMenuItem, TransformationMenuContext> {
        @Nullable
        protected TransformationMenuItem createItem(TransformationMenuContext context) {
          Item item = new Item(context);
          String description;
          try {
            description = "single item: " + item.getLabelText("");
          } catch (Throwable t) {
            Logger.getLogger(getClass()).error("Exception while executing getText of the item " + item, t);
            return null;
          }
          context.getEditorMenuTrace().pushTraceInfo();
          try {
            context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase(description, new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "2299504936702473081")));
            item.setTraceInfo(context.getEditorMenuTrace().getTraceInfo());
          } finally {
            context.getEditorMenuTrace().popTraceInfo();
          }
          return item;
        }

        private class Item extends ActionItemBase {
          private final TransformationMenuContext _context;
          private EditorMenuTraceInfo myEditorMenuTraceInfo;
          private Item(TransformationMenuContext context) {
            _context = context;
          }
          private void setTraceInfo(EditorMenuTraceInfo info) {
            myEditorMenuTraceInfo = info;
          }
          @Nullable
          @Override
          public String getLabelText(String pattern) {
            return "Create Editor";
          }

          @Override
          public void execute(@NotNull String pattern) {
            SNode editor = ConceptAspectsHelper.attachNewConceptAspect(LanguageAspect.EDITOR, _context.getNode(), SNodeFactoryOperations.createNewNode(CONCEPTS.ConceptEditorDeclaration$BH, null));
            _context.getEditorContext().getEditorPanelManager().openEditor(editor);
          }

          @Override
          public boolean canExecute(@NotNull String pattern) {
            if (Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.findConceptAspects_id4G9PD8$NvPM.invoke(_context.getNode(), SModuleOperations.getAspect(SNodeOperations.getModel(_context.getNode()).getModule(), "editor"))).any((a) -> SNodeOperations.isInstanceOf(a, CONCEPTS.ConceptEditorDeclaration$BH))) {
              // there is an editor defined
              return false;
            }

            if (ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), LINKS.propertyDeclaration$YUgg)).isEmpty() && ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), LINKS.linkDeclaration$YU1f)).isEmpty()) {
              // concept has no own features -> looking for an editor defined for structurally-equal super-concept
              if (ListSequence.fromList(new ConceptDeclarationAssistantUtil(_context.getNode()).getStructurallyEqualSuperConcepts()).any((it) -> Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.findConceptAspects_id4G9PD8$NvPM.invoke(it, SModuleOperations.getAspect(SNodeOperations.getModel(it).getModule(), "editor"))).any((a) -> SNodeOperations.isInstanceOf(a, CONCEPTS.ConceptEditorDeclaration$BH)))) {
                return false;
              }
            }

            if (SPropertyOperations.getBoolean(_context.getNode(), PROPS.abstract$ibpT)) {
              // Suppressing assistant for abstract concepts if any sub-concept has an editor defined
              if (ListSequence.fromList(SModelOperations.roots(SNodeOperations.getModel(_context.getNode()), CONCEPTS.AbstractConceptDeclaration$KA)).where((it) -> Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(it, ((boolean) false))).contains(_context.getNode())).any((it) -> Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.findConceptAspects_id4G9PD8$NvPM.invoke(it, SModuleOperations.getAspect(SNodeOperations.getModel(it).getModule(), "editor"))).any((a) -> SNodeOperations.isInstanceOf(a, CONCEPTS.ConceptEditorDeclaration$BH)))) {
                return false;
              }
            }

            return true;
          }



          @Override
          public EditorMenuTraceInfo getTraceInfo() {
            return myEditorMenuTraceInfo;
          }

        }

      }
      private class TMP_Action_dubn3u_b0a0 extends SingleItemMenuPart<TransformationMenuItem, TransformationMenuContext> {
        @Nullable
        protected TransformationMenuItem createItem(TransformationMenuContext context) {
          Item item = new Item(context);
          String description;
          try {
            description = "single item: " + item.getLabelText("");
          } catch (Throwable t) {
            Logger.getLogger(getClass()).error("Exception while executing getText of the item " + item, t);
            return null;
          }
          context.getEditorMenuTrace().pushTraceInfo();
          try {
            context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase(description, new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "8887077936715824733")));
            item.setTraceInfo(context.getEditorMenuTrace().getTraceInfo());
          } finally {
            context.getEditorMenuTrace().popTraceInfo();
          }
          return item;
        }

        private class Item extends ActionItemBase {
          private final TransformationMenuContext _context;
          private EditorMenuTraceInfo myEditorMenuTraceInfo;
          private Item(TransformationMenuContext context) {
            _context = context;
          }
          private void setTraceInfo(EditorMenuTraceInfo info) {
            myEditorMenuTraceInfo = info;
          }
          @Nullable
          @Override
          public String getLabelText(String pattern) {
            return "Create Editor for " + SPropertyOperations.getString(ListSequence.fromList(new ConceptDeclarationAssistantUtil(_context.getNode()).getStructurallyEqualSuperConcepts()).last(), PROPS.name$MnvL);
          }

          @Override
          public void execute(@NotNull String pattern) {
            SNode concept = ListSequence.fromList(new ConceptDeclarationAssistantUtil(_context.getNode()).getStructurallyEqualSuperConcepts()).last();
            SNode editor = ConceptAspectsHelper.attachNewConceptAspect(LanguageAspect.EDITOR, concept, SNodeFactoryOperations.createNewNode(CONCEPTS.ConceptEditorDeclaration$BH, null));
            _context.getEditorContext().getEditorPanelManager().openEditor(editor);
          }

          @Override
          public boolean canExecute(@NotNull String pattern) {
            if (ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), LINKS.propertyDeclaration$YUgg)).isNotEmpty() || ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), LINKS.linkDeclaration$YU1f)).isNotEmpty()) {
              return false;
            }
            if (Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.findConceptAspects_id4G9PD8$NvPM.invoke(_context.getNode(), SModuleOperations.getAspect(SNodeOperations.getModel(_context.getNode()).getModule(), "editor"))).any((a) -> SNodeOperations.isInstanceOf(a, CONCEPTS.ConceptEditorDeclaration$BH))) {
              // there is an editor for this concept - not necessary to suggest new editor creation for super-concepts
              return false;
            }

            List<SNode> superConcepts = new ConceptDeclarationAssistantUtil(_context.getNode()).getStructurallyEqualSuperConcepts();
            return ListSequence.fromList(superConcepts).isNotEmpty() && ListSequence.fromList(superConcepts).all((superConcept) -> {
              Iterable<SNode> aspects = AbstractConceptDeclaration__BehaviorDescriptor.findConceptAspects_id4G9PD8$NvPM.invoke(superConcept, SModuleOperations.getAspect(SNodeOperations.getModel(superConcept).getModule(), "editor"));
              return Sequence.fromIterable(aspects).all((aspect) -> !(SNodeOperations.isInstanceOf(aspect, CONCEPTS.ConceptEditorDeclaration$BH)));
            });
          }



          @Override
          public EditorMenuTraceInfo getTraceInfo() {
            return myEditorMenuTraceInfo;
          }

        }

      }
    }
    private class TMP_Action_dubn3u_b0a extends SingleItemMenuPart<TransformationMenuItem, TransformationMenuContext> {
      @Nullable
      protected TransformationMenuItem createItem(TransformationMenuContext context) {
        Item item = new Item(context);
        String description;
        try {
          description = "single item: " + item.getLabelText("");
        } catch (Throwable t) {
          Logger.getLogger(getClass()).error("Exception while executing getText of the item " + item, t);
          return null;
        }
        context.getEditorMenuTrace().pushTraceInfo();
        try {
          context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase(description, new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "616772488613303137")));
          item.setTraceInfo(context.getEditorMenuTrace().getTraceInfo());
        } finally {
          context.getEditorMenuTrace().popTraceInfo();
        }
        return item;
      }

      private class Item extends ActionItemBase {
        private final TransformationMenuContext _context;
        private EditorMenuTraceInfo myEditorMenuTraceInfo;
        private Item(TransformationMenuContext context) {
          _context = context;
        }
        private void setTraceInfo(EditorMenuTraceInfo info) {
          myEditorMenuTraceInfo = info;
        }
        @Nullable
        @Override
        public String getLabelText(String pattern) {
          return "Make rootable";
        }

        @Override
        public void execute(@NotNull String pattern) {
          SPropertyOperations.assign(_context.getNode(), PROPS.rootable$_9pz, true);
        }

        @Override
        public boolean canExecute(@NotNull String pattern) {
          // Suggesting to make the concept rootable if:
          // 1. Concept has no super-concepts
          // 2. There are no other concepts in this model with the containment link to this concept
          if (SPropertyOperations.getBoolean(_context.getNode(), PROPS.rootable$_9pz) || SPropertyOperations.getBoolean(_context.getNode(), PROPS.abstract$ibpT)) {
            return false;
          }
          return Sequence.fromIterable(SLinkOperations.collectMany(SModelOperations.roots(SNodeOperations.getModel(_context.getNode()), CONCEPTS.AbstractConceptDeclaration$KA), LINKS.linkDeclaration$YU1f)).where((it) -> SLinkOperations.getTarget(it, LINKS.target$m40F) != null && SEnumOperations.isMember(SPropertyOperations.getEnum(it, PROPS.metaClass$PeKc), 0xfc6f4e95b9L)).where((it) -> (boolean) AbstractConceptDeclaration__BehaviorDescriptor.isSubconceptOf_id73yVtVlWOga.invoke(_context.getNode(), SLinkOperations.getTarget(it, LINKS.target$m40F))).isEmpty();
        }



        @Override
        public EditorMenuTraceInfo getTraceInfo() {
          return myEditorMenuTraceInfo;
        }

      }

    }
    public class TMP_Group_dubn3u_c0a extends GroupMenuPart<TransformationMenuItem, TransformationMenuContext> {
      public TMP_Group_dubn3u_c0a() {
        super(new EditorMenuDescriptorBase("transformation menu group", new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "8222073419151926197")));
      }
      @Override
      protected boolean isApplicable(TransformationMenuContext _context) {
        Iterable<SNode> links = ListSequence.fromList(AbstractConceptDeclaration__BehaviorDescriptor.getLinkDeclarations_idhEwILKK.invoke(_context.getNode())).where((it) -> !(SNodeOperations.is(it, new SNodePointer("r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)", "5169995583184591170"))));
        // skipping abstract nodes & smart references
        return !(SPropertyOperations.getBoolean(_context.getNode(), PROPS.abstract$ibpT)) && (Sequence.fromIterable(links).count() != 1 || !(SEnumOperations.isMember(SPropertyOperations.getEnum(Sequence.fromIterable(links).first(), PROPS.metaClass$PeKc), 0xfc6f4e95b8L)));
      }
      @Override
      protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts() {
        return Arrays.<MenuPart<TransformationMenuItem, TransformationMenuContext>>asList(new TMP_Action_dubn3u_a2a0(), new TMP_Action_dubn3u_b2a0());
      }
      private class TMP_Action_dubn3u_a2a0 extends SingleItemMenuPart<TransformationMenuItem, TransformationMenuContext> {
        @Nullable
        protected TransformationMenuItem createItem(TransformationMenuContext context) {
          Item item = new Item(context);
          String description;
          try {
            description = "single item: " + item.getLabelText("");
          } catch (Throwable t) {
            Logger.getLogger(getClass()).error("Exception while executing getText of the item " + item, t);
            return null;
          }
          context.getEditorMenuTrace().pushTraceInfo();
          try {
            context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase(description, new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "4808044577948978174")));
            item.setTraceInfo(context.getEditorMenuTrace().getTraceInfo());
          } finally {
            context.getEditorMenuTrace().popTraceInfo();
          }
          return item;
        }

        private class Item extends ActionItemBase {
          private final TransformationMenuContext _context;
          private EditorMenuTraceInfo myEditorMenuTraceInfo;
          private Item(TransformationMenuContext context) {
            _context = context;
          }
          private void setTraceInfo(EditorMenuTraceInfo info) {
            myEditorMenuTraceInfo = info;
          }
          @Nullable
          @Override
          public String getLabelText(String pattern) {
            return "Set Alias";
          }

          @Override
          public void execute(@NotNull String pattern) {
            SPropertyOperations.assign(_context.getNode(), PROPS.conceptAlias$OL_L, "<" + SPropertyOperations.getString(_context.getNode(), PROPS.name$MnvL) + "_Alias>");
            SelectionUtil.selectLabelCellWithSelection(_context.getEditorContext(), _context.getNode(), "*" + CellIdManager.createPropertyId("conceptAlias"), 0, -1);
          }

          @Override
          public boolean canExecute(@NotNull String pattern) {
            if (isNotEmptyString(SPropertyOperations.getString(_context.getNode(), PROPS.conceptAlias$OL_L))) {
              return false;
            }

            final Set<SNode> superContepts = SetSequence.fromSetWithValues(new HashSet<SNode>(), AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(_context.getNode(), ((boolean) false)));
            // Suggesting to specify alias if:
            // 1. one of super-concepts has alias specified
            // 2. any concept has chid reference containing super-concept of this one
            //    this means: the node will be available in the list of competion menu items
            return SetSequence.fromSet(superContepts).any((it) -> isNotEmptyString(SPropertyOperations.getString(it, PROPS.conceptAlias$OL_L))) || Sequence.fromIterable(SLinkOperations.collectMany(SModelOperations.roots(SNodeOperations.getModel(_context.getNode()), CONCEPTS.AbstractConceptDeclaration$KA), LINKS.linkDeclaration$YU1f)).where((it) -> SEnumOperations.isMember(SPropertyOperations.getEnum(it, PROPS.metaClass$PeKc), 0xfc6f4e95b9L) && SetSequence.fromSet(superContepts).contains(SLinkOperations.getTarget(it, LINKS.target$m40F))).isNotEmpty();
          }



          @Override
          public EditorMenuTraceInfo getTraceInfo() {
            return myEditorMenuTraceInfo;
          }

        }

      }
      private class TMP_Action_dubn3u_b2a0 extends SingleItemMenuPart<TransformationMenuItem, TransformationMenuContext> {
        @Nullable
        protected TransformationMenuItem createItem(TransformationMenuContext context) {
          Item item = new Item(context);
          String description;
          try {
            description = "single item: " + item.getLabelText("");
          } catch (Throwable t) {
            Logger.getLogger(getClass()).error("Exception while executing getText of the item " + item, t);
            return null;
          }
          context.getEditorMenuTrace().pushTraceInfo();
          try {
            context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase(description, new SNodePointer("r:00000000-0000-4000-0000-011c8959028d(jetbrains.mps.lang.structure.editor)", "8222073419151851461")));
            item.setTraceInfo(context.getEditorMenuTrace().getTraceInfo());
          } finally {
            context.getEditorMenuTrace().popTraceInfo();
          }
          return item;
        }

        private class Item extends ActionItemBase {
          private final TransformationMenuContext _context;
          private EditorMenuTraceInfo myEditorMenuTraceInfo;
          private Item(TransformationMenuContext context) {
            _context = context;
          }
          private void setTraceInfo(EditorMenuTraceInfo info) {
            myEditorMenuTraceInfo = info;
          }
          @Nullable
          @Override
          public String getLabelText(String pattern) {
            return "Add name property";
          }

          @Override
          public void execute(@NotNull String pattern) {
            ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), LINKS.implements$u_P2)).addElement(_quotation_createNode_dubn3u_a0a0a0b2a0());
          }

          @Override
          public boolean canExecute(@NotNull String pattern) {
            if ((boolean) AbstractConceptDeclaration__BehaviorDescriptor.isSubconceptOf_id4UTtJHK9fEJ.invoke(_context.getNode(), CONCEPTS.INamedConcept$Kd)) {
              return false;
            }
            return SPropertyOperations.getBoolean(_context.getNode(), PROPS.rootable$_9pz) || Sequence.fromIterable(SLinkOperations.collectMany(SModelOperations.roots(SNodeOperations.getModel(_context.getNode()), CONCEPTS.AbstractConceptDeclaration$KA), LINKS.linkDeclaration$YU1f)).where((it) -> SEnumOperations.isMember(SPropertyOperations.getEnum(it, PROPS.metaClass$PeKc), 0xfc6f4e95b8L) && SLinkOperations.getTarget(it, LINKS.target$m40F) == _context.getNode()).isNotEmpty();
          }



          @Override
          public EditorMenuTraceInfo getTraceInfo() {
            return myEditorMenuTraceInfo;
          }

        }

      }
    }
  }
  private static SNode _quotation_createNode_dubn3u_a0a0a0b2a0() {
    SNode quotedNode_1 = null;
    SNodeBuilder nb = new SNodeBuilder(null, null).init(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, "jetbrains.mps.lang.structure"), 0x110356fc618L, "InterfaceConceptReference"));
    quotedNode_1 = nb.getResult();
    nb.setReference(MetaAdapterFactory.getReferenceLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x110356fc618L, 0x110356fe029L, "intfc"), "r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)/1169194658468");
    return quotedNode_1;
  }
  private static boolean isNotEmptyString(String str) {
    return str != null && str.length() > 0;
  }

  private static final class PROPS {
    /*package*/ static final SProperty name$MnvL = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name");
    /*package*/ static final SProperty abstract$ibpT = MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x403a32c5772c7ec2L, "abstract");
    /*package*/ static final SProperty rootable$_9pz = MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, 0xff49c1d648L, "rootable");
    /*package*/ static final SProperty metaClass$PeKc = MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass");
    /*package*/ static final SProperty conceptAlias$OL_L = MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x46ab0ad5826c74caL, "conceptAlias");
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept ConceptEditorDeclaration$BH = MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9845363abL, "jetbrains.mps.lang.editor.structure.ConceptEditorDeclaration");
    /*package*/ static final SConcept AbstractConceptDeclaration$KA = MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, "jetbrains.mps.lang.structure.structure.AbstractConceptDeclaration");
    /*package*/ static final SInterfaceConcept INamedConcept$Kd = MetaAdapterFactory.getInterfaceConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, "jetbrains.mps.lang.core.structure.INamedConcept");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink propertyDeclaration$YUgg = MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6cL, "propertyDeclaration");
    /*package*/ static final SContainmentLink linkDeclaration$YU1f = MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6bL, "linkDeclaration");
    /*package*/ static final SReferenceLink target$m40F = MetaAdapterFactory.getReferenceLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf98055fef0L, "target");
    /*package*/ static final SContainmentLink implements$u_P2 = MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, 0x110358d693eL, "implements");
  }
}
