package jetbrains.mps.lang.core.editor;

/*Generated by MPS */

import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase;
import jetbrains.mps.openapi.editor.descriptor.EditorHintsProvider;
import java.util.Collection;
import jetbrains.mps.openapi.editor.descriptor.ConceptEditorHint;
import java.util.Arrays;
import jetbrains.mps.editor.runtime.descriptor.ConceptEditorHintImpl;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.openapi.editor.descriptor.ConceptEditor;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import java.util.Collections;
import jetbrains.mps.openapi.editor.descriptor.ConceptEditorComponent;
import jetbrains.mps.openapi.editor.descriptor.TransformationMenu;
import jetbrains.mps.openapi.editor.descriptor.NamedMenuId;
import jetbrains.mps.openapi.editor.descriptor.SubstituteMenu;
import jetbrains.mps.openapi.editor.menus.style.EditorMenuItemCustomizer;
import jetbrains.mps.lang.smodel.ConceptSwitchIndex;
import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder;
import jetbrains.mps.smodel.adapter.ids.MetaIdFactory;

public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase implements EditorHintsProvider {
  private Collection<ConceptEditorHint> myHints = Arrays.<ConceptEditorHint>asList(new ConceptEditorHintImpl("comment", "comment", false, "jetbrains.mps.lang.core.editor.BaseEditorContextHints.comment"), new ConceptEditorHintImpl("include_deprecated_elements", "Include deprecated elements", true, "jetbrains.mps.lang.core.editor.BaseEditorContextHints.include_deprecated_elements"), new ConceptEditorHintImpl("reflectiveEditor", "reflectiveEditor", false, "jetbrains.mps.lang.core.editor.BaseEditorContextHints.reflectiveEditor"), new ConceptEditorHintImpl("ShowSuppressedErrors", "Show Suppressed Errors", true, "jetbrains.mps.lang.core.editor.SuppressedHints.ShowSuppressedErrors"));
  @NotNull
  public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
    SAbstractConcept cncpt = ((SAbstractConcept) concept);
    switch (conceptIndex.index(cncpt)) {
      case 0:
        return Collections.<ConceptEditor>singletonList(new Attribute_Editor());
      case 1:
        return Collections.<ConceptEditor>singletonList(new BaseCommentAttribute_Editor());
      case 2:
        return Collections.<ConceptEditor>singletonList(new BaseConcept_comment_Editor());
      case 3:
        return Collections.<ConceptEditor>singletonList(new BasePlaceholder_Editor());
      case 4:
        return Collections.<ConceptEditor>singletonList(new MigrationDataAnnotation_Editor());
      case 5:
        return Collections.<ConceptEditor>singletonList(new NodeAttribute_comment_Editor());
      case 6:
        return Collections.<ConceptEditor>singletonList(new ReviewMigration_Editor());
      case 7:
        return Collections.<ConceptEditor>singletonList(new ReviewMigration_old_Editor());
      case 8:
        return Collections.<ConceptEditor>singletonList(new SideTransformInfo_Editor());
      case 9:
        return Arrays.asList(new ConceptEditor[]{new SuppressErrorsAnnotation_Editor(), new SuppressErrorsAnnotation_ShowSuppressedErrors_Editor()});
      case 10:
        return Collections.<ConceptEditor>singletonList(new TypeAnnotated_Editor());
      default:
    }
    return Collections.<ConceptEditor>emptyList();
  }
  private Collection<ConceptEditorComponent> getDeclaredEC_0(String editorComponentId) {
    switch (editorComponentId) {
      case "jetbrains.mps.lang.core.editor.ImplementationRemovedInStubMessage":
        return Collections.singletonList(new ImplementationRemovedInStubMessage());
      case "jetbrains.mps.lang.core.editor.ShortDescriptionEditorComponent":
        return Collections.singletonList(new ShortDescriptionEditorComponent());
      case "jetbrains.mps.lang.core.editor.VirtualPackage":
        return Collections.singletonList(new VirtualPackage());
      case "jetbrains.mps.lang.core.editor.alias":
        return Collections.singletonList(new alias());
    }
    return Collections.emptyList();
  }
  private Collection<ConceptEditorComponent> getDeclaredEC_1(String editorComponentId) {
    if ("jetbrains.mps.lang.core.editor.SuppressedErrorComponent".equals(editorComponentId)) {
      return Collections.singletonList(new SuppressedErrorComponent());
    }
    return Collections.emptyList();
  }
  @NotNull
  public Collection<ConceptEditorComponent> getDeclaredEditorComponents(SAbstractConcept concept, String editorComponentId) {
    SAbstractConcept cncpt = ((SAbstractConcept) concept);
    switch (conceptIndex1.index(cncpt)) {
      case 0:
        return getDeclaredEC_0(editorComponentId);
      case 1:
        return getDeclaredEC_1(editorComponentId);
      default:
    }
    return Collections.emptyList();
  }

  public Collection<ConceptEditorHint> getHints() {
    return myHints;
  }

  @NotNull
  @Override
  public Collection<TransformationMenu> getDeclaredDefaultTransformationMenus(SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (conceptIndex2.index(cncpt)) {
      case 0:
        return Collections.<TransformationMenu>singletonList(new Attribute_TransformationMenu());
      case 1:
        return Collections.<TransformationMenu>singletonList(new BaseConcept_TransformationMenu());
      case 2:
        return Collections.<TransformationMenu>singletonList(new ChildAttribute_TransformationMenu());
      default:
    }
    return Collections.<TransformationMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<TransformationMenu> getDeclaredNamedTransformationMenus(NamedMenuId menuId) {
    SAbstractConcept cncpt = (SAbstractConcept) menuId.getConcept();
    switch (conceptIndex3.index(cncpt)) {
      case 0:
        if (true) {
          switch (menuId.getFqName()) {
            case "jetbrains.mps.lang.core.editor.BasePlaceholder_TransformationMenu":
              return Arrays.asList(new TransformationMenu[]{new BasePlaceholder_TransformationMenu()});
            default:
          }
        }
        break;
      default:
    }

    return Collections.<TransformationMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<SubstituteMenu> getDeclaredDefaultSubstituteMenus(SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (conceptIndex4.index(cncpt)) {
      case 0:
        return Collections.<SubstituteMenu>singletonList(new BaseConcept_SubstituteMenu());
      case 1:
        return Collections.<SubstituteMenu>singletonList(new IPlaceholderContent_SubstituteMenu());
      case 2:
        return Collections.<SubstituteMenu>singletonList(new TypeAnnotated_SubstituteMenu());
      default:
    }
    return Collections.<SubstituteMenu>emptyList();
  }
  @NotNull
  @Override
  public Collection<EditorMenuItemCustomizer> getEditorMenuItemCustomizers() {
    return Arrays.asList(new EditorMenuItemCustomizer[]{new StrikeOutActionsOfDeprecatedConcept()});
  }

  private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x47bf8397520e5939L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x3dcc194340c24debL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x339681b4da4ef1a7L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x78c7e79625990591L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da54L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x78c7e79625a38e06L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2274019e61e234c9L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0xad0053c7ae9194dL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x3a98b0957fe8e5d2L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x48fdf6754d38a0a9L)).seal();
  private static final ConceptSwitchIndex conceptIndex1 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x3a98b0957fe8e5d2L)).seal();
  private static final ConceptSwitchIndex conceptIndex2 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x47bf8397520e5939L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x9d98713f247885aL)).seal();
  private static final ConceptSwitchIndex conceptIndex3 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x339681b4da4ef1a7L)).seal();
  private static final ConceptSwitchIndex conceptIndex4 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x38518aff8a105fd6L), MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x48fdf6754d38a0a9L)).seal();
}
