package jetbrains.mps.samples.highlevel.sampleLanguage.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_Car;
private ConceptPresentation props_Person;
@Override
@Nullable
public ConceptPresentation getDescriptor(SAbstractConcept c) {
StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class);
switch (structureDescriptor.internalIndex(c)) {
case LanguageConceptSwitch.Car:
if (props_Car == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_Car = cpb.create();
}
return props_Car;
case LanguageConceptSwitch.Person:
if (props_Person == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_Person = cpb.create();
}
return props_Person;
}
return null;
}
}