package messages.customization.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_AuxConcept;
  private ConceptPresentation props_BrokenConcept;
  private ConceptPresentation props_CardinalityTestConcept;
  private ConceptPresentation props_CardinalityTestConcept0;
  private ConceptPresentation props_IncorrectTargetTestConcept;
  private ConceptPresentation props_TestConcept;
  private ConceptPresentation props_TestConcept0;

  @Override
  @Nullable
  public ConceptPresentation getDescriptor(SAbstractConcept c) {
    StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class);
    switch (structureDescriptor.internalIndex(c)) {
      case LanguageConceptSwitch.AuxConcept:
        if (props_AuxConcept == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_AuxConcept = cpb.create();
        }
        return props_AuxConcept;
      case LanguageConceptSwitch.BrokenConcept:
        if (props_BrokenConcept == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_BrokenConcept = cpb.create();
        }
        return props_BrokenConcept;
      case LanguageConceptSwitch.CardinalityTestConcept:
        if (props_CardinalityTestConcept == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_CardinalityTestConcept = cpb.create();
        }
        return props_CardinalityTestConcept;
      case LanguageConceptSwitch.CardinalityTestConcept0:
        if (props_CardinalityTestConcept0 == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_CardinalityTestConcept0 = cpb.create();
        }
        return props_CardinalityTestConcept0;
      case LanguageConceptSwitch.IncorrectTargetTestConcept:
        if (props_IncorrectTargetTestConcept == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_IncorrectTargetTestConcept = cpb.create();
        }
        return props_IncorrectTargetTestConcept;
      case LanguageConceptSwitch.TestConcept:
        if (props_TestConcept == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_TestConcept = cpb.create();
        }
        return props_TestConcept;
      case LanguageConceptSwitch.TestConcept0:
        if (props_TestConcept0 == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_TestConcept0 = cpb.create();
        }
        return props_TestConcept0;
    }
    return null;
  }
}
