package org.jetbrains.mps.samples.ParallelFor.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_NonThreadSafeClass;
private ConceptPresentation props_ParallelFor;
private ConceptPresentation props_ParallelLoopVariable;
private ConceptPresentation props_ThreadPool;
private ConceptPresentation props_ThreadSafe;
@Override
@Nullable
public ConceptPresentation getDescriptor(SAbstractConcept c) {
StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class);
switch (structureDescriptor.internalIndex(c)) {
case LanguageConceptSwitch.NonThreadSafeClass:
if (props_NonThreadSafeClass == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_NonThreadSafeClass = cpb.create();
}
return props_NonThreadSafeClass;
case LanguageConceptSwitch.ParallelFor:
if (props_ParallelFor == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_ParallelFor = cpb.create();
}
return props_ParallelFor;
case LanguageConceptSwitch.ParallelLoopVariable:
if (props_ParallelLoopVariable == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_ParallelLoopVariable = cpb.create();
}
return props_ParallelLoopVariable;
case LanguageConceptSwitch.ThreadPool:
if (props_ThreadPool == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_ThreadPool = cpb.create();
}
return props_ThreadPool;
case LanguageConceptSwitch.ThreadSafe:
if (props_ThreadSafe == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
props_ThreadSafe = cpb.create();
}
return props_ThreadSafe;
}
return null;
}
}