package jetbrains.mps.samples.formulaLanguage.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_AndOperation; private ConceptPresentation props_Constant; private ConceptPresentation props_EqualsOperation; private ConceptPresentation props_Expression; private ConceptPresentation props_FloatingPointConstant; private ConceptPresentation props_Formula; private ConceptPresentation props_Function; private ConceptPresentation props_GreaterThanOperation; private ConceptPresentation props_IfFunction; private ConceptPresentation props_IntegerConstant; private ConceptPresentation props_IsNullOperation; private ConceptPresentation props_LessThanOperation; private ConceptPresentation props_MinusOperation; private ConceptPresentation props_MultOperation; private ConceptPresentation props_NotOperation; private ConceptPresentation props_NullConstant; private ConceptPresentation props_Operation; private ConceptPresentation props_OrOperation; private ConceptPresentation props_ParenthisizedExpression; private ConceptPresentation props_PlusOperation; private ConceptPresentation props_Reference; private ConceptPresentation props_StringConstant; @Override @Nullable public ConceptPresentation getDescriptor(SAbstractConcept c) { StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class); switch (structureDescriptor.internalIndex(c)) { case LanguageConceptSwitch.AndOperation: if (props_AndOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("and operation"); props_AndOperation = cpb.create(); } return props_AndOperation; case LanguageConceptSwitch.Constant: if (props_Constant == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Constant = cpb.create(); } return props_Constant; case LanguageConceptSwitch.EqualsOperation: if (props_EqualsOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("equals operation"); props_EqualsOperation = cpb.create(); } return props_EqualsOperation; case LanguageConceptSwitch.Expression: if (props_Expression == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Expression = cpb.create(); } return props_Expression; case LanguageConceptSwitch.FloatingPointConstant: if (props_FloatingPointConstant == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("floating point constant"); props_FloatingPointConstant = cpb.create(); } return props_FloatingPointConstant; case LanguageConceptSwitch.Formula: if (props_Formula == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Formula = cpb.create(); } return props_Formula; case LanguageConceptSwitch.Function: if (props_Function == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Function = cpb.create(); } return props_Function; case LanguageConceptSwitch.GreaterThanOperation: if (props_GreaterThanOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("greater than operation"); props_GreaterThanOperation = cpb.create(); } return props_GreaterThanOperation; case LanguageConceptSwitch.IfFunction: if (props_IfFunction == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("if-function"); props_IfFunction = cpb.create(); } return props_IfFunction; case LanguageConceptSwitch.IntegerConstant: if (props_IntegerConstant == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("integer constant"); props_IntegerConstant = cpb.create(); } return props_IntegerConstant; case LanguageConceptSwitch.IsNullOperation: if (props_IsNullOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_IsNullOperation = cpb.create(); } return props_IsNullOperation; case LanguageConceptSwitch.LessThanOperation: if (props_LessThanOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("less than operation"); props_LessThanOperation = cpb.create(); } return props_LessThanOperation; case LanguageConceptSwitch.MinusOperation: if (props_MinusOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("minus operation"); props_MinusOperation = cpb.create(); } return props_MinusOperation; case LanguageConceptSwitch.MultOperation: if (props_MultOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("multiply operation"); props_MultOperation = cpb.create(); } return props_MultOperation; case LanguageConceptSwitch.NotOperation: if (props_NotOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("not operation (formula language)"); props_NotOperation = cpb.create(); } return props_NotOperation; case LanguageConceptSwitch.NullConstant: if (props_NullConstant == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("null expression"); props_NullConstant = cpb.create(); } return props_NullConstant; case LanguageConceptSwitch.Operation: if (props_Operation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Operation = cpb.create(); } return props_Operation; case LanguageConceptSwitch.OrOperation: if (props_OrOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("or operation"); props_OrOperation = cpb.create(); } return props_OrOperation; case LanguageConceptSwitch.ParenthisizedExpression: if (props_ParenthisizedExpression == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("(expr)"); props_ParenthisizedExpression = cpb.create(); } return props_ParenthisizedExpression; case LanguageConceptSwitch.PlusOperation: if (props_PlusOperation == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("plus operation"); props_PlusOperation = cpb.create(); } return props_PlusOperation; case LanguageConceptSwitch.Reference: if (props_Reference == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_Reference = cpb.create(); } return props_Reference; case LanguageConceptSwitch.StringConstant: if (props_StringConstant == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("string constant"); props_StringConstant = cpb.create(); } return props_StringConstant; } return null; } }