package jetbrains.mps.samples.lambdaCalculus.editor;

/*Generated by MPS */

import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
import jetbrains.mps.openapi.editor.descriptor.ConceptEditor;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import java.util.Collections;
import jetbrains.mps.openapi.editor.descriptor.TransformationMenu;
import jetbrains.mps.openapi.editor.descriptor.NamedMenuId;
import java.util.Arrays;
import jetbrains.mps.openapi.editor.descriptor.SubstituteMenu;
import jetbrains.mps.lang.smodel.ConceptSwitchIndex;
import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder;
import jetbrains.mps.smodel.adapter.ids.MetaIdFactory;

public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase {
  @NotNull
  public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
    SAbstractConcept cncpt = ((SAbstractConcept) concept);
    switch (conceptIndex.index(cncpt)) {
      case 0:
        return Collections.<ConceptEditor>singletonList(new BinaryOperation_Editor());
      case 1:
        return Collections.<ConceptEditor>singletonList(new FunctionType_Editor());
      case 2:
        return Collections.<ConceptEditor>singletonList(new LambdaAbstraction_Editor());
      case 3:
        return Collections.<ConceptEditor>singletonList(new LambdaApplication_Editor());
      case 4:
        return Collections.<ConceptEditor>singletonList(new LetExpression_Editor());
      case 5:
        return Collections.<ConceptEditor>singletonList(new MultipleExpression_Editor());
      case 6:
        return Collections.<ConceptEditor>singletonList(new NumberType_Editor());
      case 7:
        return Collections.<ConceptEditor>singletonList(new NumericConstant_Editor());
      case 8:
        return Collections.<ConceptEditor>singletonList(new ParenthesisExpression_Editor());
      case 9:
        return Collections.<ConceptEditor>singletonList(new Program_Editor());
      case 10:
        return Collections.<ConceptEditor>singletonList(new StringConstant_Editor());
      case 11:
        return Collections.<ConceptEditor>singletonList(new StringType_Editor());
      case 12:
        return Collections.<ConceptEditor>singletonList(new Variable_Editor());
      case 13:
        return Collections.<ConceptEditor>singletonList(new VariableReference_Editor());
      default:
    }
    return Collections.<ConceptEditor>emptyList();
  }


  @NotNull
  @Override
  public Collection<TransformationMenu> getDeclaredDefaultTransformationMenus(SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (conceptIndex1.index(cncpt)) {
      case 0:
        return Collections.<TransformationMenu>singletonList(new LambdaExpression_TransformationMenu());
      default:
    }
    return Collections.<TransformationMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<TransformationMenu> getDeclaredNamedTransformationMenus(NamedMenuId menuId) {
    SAbstractConcept cncpt = (SAbstractConcept) menuId.getConcept();
    switch (conceptIndex2.index(cncpt)) {
      case 0:
        if (true) {
          switch (menuId.getFqName()) {
            case "jetbrains.mps.samples.lambdaCalculus.editor.BinaryOperations":
              return Arrays.asList(new TransformationMenu[]{new BinaryOperations()});
            case "jetbrains.mps.samples.lambdaCalculus.editor.SideTransformApplication":
              return Arrays.asList(new TransformationMenu[]{new SideTransformApplication()});
            case "jetbrains.mps.samples.lambdaCalculus.editor.SideTransformMultiple":
              return Arrays.asList(new TransformationMenu[]{new SideTransformMultiple()});
            default:
          }
        }
        break;
      default:
    }

    return Collections.<TransformationMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<SubstituteMenu> getDeclaredDefaultSubstituteMenus(SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (conceptIndex3.index(cncpt)) {
      case 0:
        return Collections.<SubstituteMenu>singletonList(new AbstractionVarRef_SubstituteMenu());
      case 1:
        return Collections.<SubstituteMenu>singletonList(new LambdaExpression_SubstituteMenu());
      case 2:
        return Collections.<SubstituteMenu>singletonList(new LetRef_SubstituteMenu());
      default:
    }
    return Collections.<SubstituteMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<SubstituteMenu> getDeclaredNamedSubstituteMenus(NamedMenuId menuId) {
    SAbstractConcept cncpt = (SAbstractConcept) menuId.getConcept();
    switch (conceptIndex4.index(cncpt)) {
      case 0:
        if (true) {
          switch (menuId.getFqName()) {
            case "jetbrains.mps.samples.lambdaCalculus.editor.Lambda_Substitute":
              return Arrays.asList(new SubstituteMenu[]{new Lambda_Substitute()});
            case "jetbrains.mps.samples.lambdaCalculus.editor.Let_Substitute":
              return Arrays.asList(new SubstituteMenu[]{new Let_Substitute()});
            case "jetbrains.mps.samples.lambdaCalculus.editor.Numeric_Substitute":
              return Arrays.asList(new SubstituteMenu[]{new Numeric_Substitute()});
            case "jetbrains.mps.samples.lambdaCalculus.editor.ParenthesisSubstitute":
              return Arrays.asList(new SubstituteMenu[]{new ParenthesisSubstitute()});
            default:
          }
        }
        break;
      default:
    }

    return Collections.<SubstituteMenu>emptyList();
  }

  private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x1ad829a6925a095bL), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x3ee0e3dd7c1afae8L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7eccf80L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ee2dddL), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x448ba254edbfc79fL), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x15b75b54f176d1a3L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x3ee0e3dd7c1afadaL), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ee2dd5L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x3735fdad52687b59L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7fc0389L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ee2dc8L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x3ee0e3dd7c1afae1L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x48db75d5dc496b12L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x48db75d5dc496b08L)).seal();
  private static final ConceptSwitchIndex conceptIndex1 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ec98e9L)).seal();
  private static final ConceptSwitchIndex conceptIndex2 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ec98e9L)).seal();
  private static final ConceptSwitchIndex conceptIndex3 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7fe548fL), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ec98e9L), MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x448ba254edc7216cL)).seal();
  private static final ConceptSwitchIndex conceptIndex4 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x7c9e280794ad4afcL, 0xadf0aaee45eb2895L, 0x37d11ba7d7ec98e9L)).seal();
}
