package jetbrains.mps.testHybridEditor.structure;

/*Generated by MPS */

import jetbrains.mps.smodel.runtime.BaseStructureAspectDescriptor;
import jetbrains.mps.smodel.runtime.ConceptDescriptor;
import java.util.Collection;
import java.util.Arrays;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.smodel.adapter.ids.SConceptId;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2;
import jetbrains.mps.smodel.adapter.ids.PrimitiveTypeId;

public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
  /*package*/ final ConceptDescriptor myConceptBlock = createDescriptorForBlock();
  /*package*/ final ConceptDescriptor myConceptBlockExt = createDescriptorForBlockExt();
  /*package*/ final ConceptDescriptor myConceptBlockInstance = createDescriptorForBlockInstance();
  /*package*/ final ConceptDescriptor myConceptConnector = createDescriptorForConnector();
  /*package*/ final ConceptDescriptor myConceptConnectorEndInstance = createDescriptorForConnectorEndInstance();
  /*package*/ final ConceptDescriptor myConceptConnectorInstance = createDescriptorForConnectorInstance();
  /*package*/ final ConceptDescriptor myConceptDiagram = createDescriptorForDiagram();
  /*package*/ final ConceptDescriptor myConceptInputPort = createDescriptorForInputPort();
  /*package*/ final ConceptDescriptor myConceptMetaBlock = createDescriptorForMetaBlock();
  /*package*/ final ConceptDescriptor myConceptMetaPort = createDescriptorForMetaPort();
  /*package*/ final ConceptDescriptor myConceptOutputPort = createDescriptorForOutputPort();
  private final LanguageConceptSwitch myIndexSwitch;

  public StructureAspectDescriptor() {
    myIndexSwitch = new LanguageConceptSwitch();
  }


  @Override
  public void reportDependencies(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.Dependencies deps) {
    deps.extendedLanguage(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, "jetbrains.mps.lang.core");
  }

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(myConceptBlock, myConceptBlockExt, myConceptBlockInstance, myConceptConnector, myConceptConnectorEndInstance, myConceptConnectorInstance, myConceptDiagram, myConceptInputPort, myConceptMetaBlock, myConceptMetaPort, myConceptOutputPort);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(SConceptId id) {
    switch (myIndexSwitch.index(id)) {
      case LanguageConceptSwitch.Block:
        return myConceptBlock;
      case LanguageConceptSwitch.BlockExt:
        return myConceptBlockExt;
      case LanguageConceptSwitch.BlockInstance:
        return myConceptBlockInstance;
      case LanguageConceptSwitch.Connector:
        return myConceptConnector;
      case LanguageConceptSwitch.ConnectorEndInstance:
        return myConceptConnectorEndInstance;
      case LanguageConceptSwitch.ConnectorInstance:
        return myConceptConnectorInstance;
      case LanguageConceptSwitch.Diagram:
        return myConceptDiagram;
      case LanguageConceptSwitch.InputPort:
        return myConceptInputPort;
      case LanguageConceptSwitch.MetaBlock:
        return myConceptMetaBlock;
      case LanguageConceptSwitch.MetaPort:
        return myConceptMetaPort;
      case LanguageConceptSwitch.OutputPort:
        return myConceptOutputPort;
      default:
        return null;
    }
  }


  /*package*/ int internalIndex(SAbstractConcept c) {
    return myIndexSwitch.index(c);
  }

  private static ConceptDescriptor createDescriptorForBlock() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "Block", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702f98L);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/725186580883451800");
    b.version(3);
    b.property("x", 0x57239d35e26cf167L).type(PrimitiveTypeId.INTEGER).origin("6279035160242221415").done();
    b.property("y", 0x57239d35e26cf357L).type(PrimitiveTypeId.INTEGER).origin("6279035160242221911").done();
    b.property("myBooleanProperty", 0x44b26e77dadd9885L).type(PrimitiveTypeId.BOOLEAN).origin("4950140401485715589").done();
    b.aggregate("inputPorts", 0xa10615a65702ffeL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fb4L).optional(true).ordered(true).multiple(true).origin("725186580883451902").done();
    b.aggregate("outputPorts", 0xa10615a65703000L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fbfL).optional(true).ordered(true).multiple(true).origin("725186580883451904").done();
    b.alias("block");
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForBlockExt() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "BlockExt", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x471a0145ea2e78cL);
    b.class_(false, false, false);
    // extends: jetbrains.mps.testHybridEditor.structure.Block
    b.super_(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702f98L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/320213057867540364");
    b.version(3);
    b.associate("mb", 0x471a0145ea2f5ffL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40c2c8L).optional(false).origin("320213057867544063").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForBlockInstance() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "BlockInstance", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec43f49dL);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/2353136177974080669");
    b.version(3);
    b.property("x", 0x20a804e2ec440489L).type(PrimitiveTypeId.INTEGER).origin("2353136177974084745").done();
    b.property("y", 0x20a804e2ec44048aL).type(PrimitiveTypeId.INTEGER).origin("2353136177974084746").done();
    b.property("width", 0x2c11e15d8177197eL).type(PrimitiveTypeId.INTEGER).origin("3175567003993184638").done();
    b.property("height", 0x2c11e15d817719aeL).type(PrimitiveTypeId.INTEGER).origin("3175567003993184686").done();
    b.property("myBooleanProperty", 0x54d09465ef79299fL).type(PrimitiveTypeId.BOOLEAN).origin("6111547859872065951").done();
    b.associate("metaBlock", 0x20a804e2ec4404a9L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40c2c8L).optional(false).origin("2353136177974084777").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForConnector() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "Connector", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fa1L);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/725186580883451809");
    b.version(3);
    b.associate("outputPort", 0xa10615a65703014L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fbfL).optional(false).origin("725186580883451924").done();
    b.associate("inputPort", 0xa10615a65703018L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fb4L).optional(false).origin("725186580883451928").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForConnectorEndInstance() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "ConnectorEndInstance", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x4966445919822461L);
    b.class_(false, false, false);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/5288989961863963745");
    b.version(3);
    b.associate("block", 0x49664459198225bcL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec43f49dL).optional(false).origin("5288989961863964092").done();
    b.associate("metaPort", 0x49664459198225bdL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40fc5dL).optional(false).origin("5288989961863964093").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForConnectorInstance() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "ConnectorInstance", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec441516L);
    b.class_(false, false, false);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/2353136177974088982");
    b.version(3);
    b.property("iconPath", 0x7f3b793b6d868942L).type(PrimitiveTypeId.STRING).origin("9168054762590341442").done();
    b.aggregate("source", 0x49664459198225c0L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x4966445919822461L).optional(false).ordered(true).multiple(false).origin("5288989961863964096").done();
    b.aggregate("target", 0x49664459198225c6L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x4966445919822461L).optional(false).ordered(true).multiple(false).origin("5288989961863964102").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForDiagram() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "Diagram", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702ec1L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/725186580883451585");
    b.version(3);
    b.aggregate("blocks", 0xa10615a65702fd8L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702f98L).optional(true).ordered(true).multiple(true).origin("725186580883451864").done();
    b.aggregate("connectors", 0xa10615a65702fdaL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fa1L).optional(true).ordered(true).multiple(true).origin("725186580883451866").done();
    b.aggregate("newBlocks", 0x20a804e2ec43f4b6L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec43f49dL).optional(true).ordered(true).multiple(true).origin("2353136177974080694").done();
    b.aggregate("newConnectors", 0x20a804e2ec4425e0L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec441516L).optional(true).ordered(true).multiple(true).origin("2353136177974093280").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForInputPort() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "InputPort", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fb4L);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/725186580883451828");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForMetaBlock() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "MetaBlock", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40c2c8L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/2353136177973871304");
    b.version(3);
    b.property("path", 0x206c20835c7e9707L).type(PrimitiveTypeId.STRING).origin("2336278055263049479").done();
    b.aggregate("inMetaPorts", 0x20a804e2ec410486L).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40fc5dL).optional(true).ordered(true).multiple(true).origin("2353136177973888134").done();
    b.aggregate("outMetaPorts", 0x2cd0b06754c8ec0cL).target(0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40fc5dL).optional(true).ordered(true).multiple(true).origin("3229274890675219468").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForMetaPort() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "MetaPort", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0x20a804e2ec40fc5dL);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/2353136177973886045");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForOutputPort() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.testHybridEditor", "OutputPort", 0x913a1d639e1948faL, 0xad03e33ecccd3814L, 0xa10615a65702fbfL);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:2a464ec2-aa44-4a2f-a388-e0917332ac68(jetbrains.mps.testHybridEditor.structure)/725186580883451839");
    b.version(3);
    return b.create();
  }
}
