package jetbrains.mps.execution.configurations.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.ConceptEditorComponent;
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 BeforeTask_Editor());
      case 1:
        return Collections.<ConceptEditor>singletonList(new BeforeTaskCall_Editor());
      case 2:
        return Collections.<ConceptEditor>singletonList(new BeforeTaskParameter_Editor());
      case 3:
        return Collections.<ConceptEditor>singletonList(new BeforeTaskParameterReference_Editor());
      case 4:
        return Collections.<ConceptEditor>singletonList(new ConfigurationFromExecutorReference_Editor());
      case 5:
        return Collections.<ConceptEditor>singletonList(new ConsoleCreator_Editor());
      case 6:
        return Collections.<ConceptEditor>singletonList(new ConsoleType_Editor());
      case 7:
        return Collections.<ConceptEditor>singletonList(new DummyRunConfigurationInitializer_Editor());
      case 8:
        return Collections.<ConceptEditor>singletonList(new EnvironmentExpression_Editor());
      case 9:
        return Collections.<ConceptEditor>singletonList(new ExecuteConfiguration_Function_Editor());
      case 10:
        return Collections.<ConceptEditor>singletonList(new GetProjectOperation_Editor());
      case 11:
        return Collections.<ConceptEditor>singletonList(new NodeListSource_Editor());
      case 12:
        return Collections.<ConceptEditor>singletonList(new NodeSource_Editor());
      case 13:
        return Collections.<ConceptEditor>singletonList(new RunConfiguration_Editor());
      case 14:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationCreator_Editor());
      case 15:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationExecutor_Editor());
      case 16:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationKind_Editor());
      case 17:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationProducer_Editor());
      case 18:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationProducerPart_Editor());
      case 19:
        return Collections.<ConceptEditor>singletonList(new RunConfigurationSource_Editor());
      case 20:
        return Collections.<ConceptEditor>singletonList(new StartProcessHandlerStatement_Editor());
      default:
    }
    return Collections.<ConceptEditor>emptyList();
  }
  private Collection<ConceptEditorComponent> getDeclaredEC_0(String editorComponentId) {
    if ("jetbrains.mps.execution.configurations.editor.BeforeTasksComponent".equals(editorComponentId)) {
      return Collections.singletonList(new BeforeTasksComponent());
    }
    return Collections.emptyList();
  }
  private Collection<ConceptEditorComponent> getDeclaredEC_1(String editorComponentId) {
    switch (editorComponentId) {
      case "jetbrains.mps.execution.configurations.editor.ComplexCanRunAndDebug":
        return Collections.singletonList(new ComplexCanRunAndDebug());
      case "jetbrains.mps.execution.configurations.editor.SimpleCanRunAndDebug":
        return Collections.singletonList(new SimpleCanRunAndDebug());
    }
    return Collections.emptyList();
  }
  private Collection<ConceptEditorComponent> getDeclaredEC_2(String editorComponentId) {
    if ("jetbrains.mps.execution.configurations.editor.StartProcessWithTool_Component".equals(editorComponentId)) {
      return Collections.singletonList(new StartProcessWithTool_Component());
    }
    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);
      case 2:
        return getDeclaredEC_2(editorComponentId);
      default:
    }
    return Collections.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.execution.configurations.editor.togglingEnabledByDefaultProp":
              return Arrays.asList(new TransformationMenu[]{new togglingEnabledByDefaultProp()});
            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 BeforeTaskCall_SubstituteMenu());
      case 1:
        return Collections.<SubstituteMenu>singletonList(new BeforeTaskParameterReference_SubstituteMenu());
      case 2:
        return Collections.<SubstituteMenu>singletonList(new ConfigurationFromExecutorReference_SubstituteMenu());
      case 3:
        return Collections.<SubstituteMenu>singletonList(new DummyRunConfigurationInitializer_SubstituteMenu());
      case 4:
        return Collections.<SubstituteMenu>singletonList(new RunConfigurationCreator_SubstituteMenu());
      case 5:
        return Collections.<SubstituteMenu>singletonList(new RunConfigurationTypeContribution());
      default:
    }
    return Collections.<SubstituteMenu>emptyList();
  }

  private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x61a8be33d403b7bfL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781f1fd8L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781f8014L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781fd3c0L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6c55c13f5bcac62fL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x161fc6929dd24a8aL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x161fc6929dd1ac93L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x1e454b508a60997cL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x7664b739387f64L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5532ce3cbd91002cL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x4bafca3d818c1d2aL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6552f0adf299246fL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6552f0adf2992471L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x2153d8f1c1f46e49L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x328e81d9f20cd1deL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6c55c13f5bc8e1ecL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x2153d8f1c1f46e4aL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x3c97fcb79c842305L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x3c97fcb79c84cda6L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x3c97fcb79c84af96L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0xd244b712f9d44d1L)).seal();
  private static final ConceptSwitchIndex conceptIndex1 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x2153d8f1c1f52479L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6c55c13f5bc8e1ecL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0xd244b712f9d44d1L)).seal();
  private static final ConceptSwitchIndex conceptIndex2 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781f1fd8L)).seal();
  private static final ConceptSwitchIndex conceptIndex3 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781f1fd8L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x5ae6ebde781fd3c0L), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x6c55c13f5bcac62fL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x1e454b508a60997cL), MetaIdFactory.conceptId(0x22e72e4c0f6946ceL, 0x84036750153aa615L, 0x328e81d9f20cd1deL), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL)).seal();
}
