package jetbrains.mps.lang.behavior.test.structure;

/*Generated by MPS */

import jetbrains.mps.smodel.runtime.ConceptPresentationAspectBase;
import jetbrains.mps.smodel.runtime.ConceptPresentation;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.ConceptPresentationBuilder;

public class ConceptPresentationAspectImpl extends ConceptPresentationAspectBase {
  private ConceptPresentation props_A;
  private ConceptPresentation props_B;
  private ConceptPresentation props_C;
  private ConceptPresentation props_I;

  @Override
  @Nullable
  public ConceptPresentation getDescriptor(SAbstractConcept c) {
    StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class);
    switch (structureDescriptor.internalIndex(c)) {
      case LanguageConceptSwitch.A:
        if (props_A == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("A");
          props_A = cpb.create();
        }
        return props_A;
      case LanguageConceptSwitch.B:
        if (props_B == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_B = cpb.create();
        }
        return props_B;
      case LanguageConceptSwitch.C:
        if (props_C == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("C");
          props_C = cpb.create();
        }
        return props_C;
      case LanguageConceptSwitch.I:
        if (props_I == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_I = cpb.create();
        }
        return props_I;
    }
    return null;
  }
}
