package jetbrains.mps.core.xml.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_XmlAttribute; private ConceptPresentation props_XmlBaseAttribute; private ConceptPresentation props_XmlBaseElement; private ConceptPresentation props_XmlBasePrologElement; private ConceptPresentation props_XmlCDATA; private ConceptPresentation props_XmlCharRef; private ConceptPresentation props_XmlCharRefValue; private ConceptPresentation props_XmlComment; private ConceptPresentation props_XmlCommentLine; private ConceptPresentation props_XmlContent; private ConceptPresentation props_XmlDeclaration; private ConceptPresentation props_XmlDoctypeDeclaration; private ConceptPresentation props_XmlDocument; private ConceptPresentation props_XmlElement; private ConceptPresentation props_XmlEntityRef; private ConceptPresentation props_XmlEntityRefValue; private ConceptPresentation props_XmlExternalId; private ConceptPresentation props_XmlFile; private ConceptPresentation props_XmlNoSpaceValue; private ConceptPresentation props_XmlPart; private ConceptPresentation props_XmlProcessingInstruction; private ConceptPresentation props_XmlProlog; private ConceptPresentation props_XmlPrologElement; private ConceptPresentation props_XmlText; private ConceptPresentation props_XmlTextValue; private ConceptPresentation props_XmlValuePart; private ConceptPresentation props_XmlWhitespace; @Override @Nullable public ConceptPresentation getDescriptor(SAbstractConcept c) { StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class); switch (structureDescriptor.internalIndex(c)) { case LanguageConceptSwitch.XmlAttribute: if (props_XmlAttribute == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlAttribute = cpb.create(); } return props_XmlAttribute; case LanguageConceptSwitch.XmlBaseAttribute: if (props_XmlBaseAttribute == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlBaseAttribute = cpb.create(); } return props_XmlBaseAttribute; case LanguageConceptSwitch.XmlBaseElement: if (props_XmlBaseElement == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlBaseElement = cpb.create(); } return props_XmlBaseElement; case LanguageConceptSwitch.XmlBasePrologElement: if (props_XmlBasePrologElement == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlBasePrologElement = cpb.create(); } return props_XmlBasePrologElement; case LanguageConceptSwitch.XmlCDATA: if (props_XmlCDATA == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlCDATA = cpb.create(); } return props_XmlCDATA; case LanguageConceptSwitch.XmlCharRef: if (props_XmlCharRef == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("single character"); props_XmlCharRef = cpb.create(); } return props_XmlCharRef; case LanguageConceptSwitch.XmlCharRefValue: if (props_XmlCharRefValue == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("single character"); props_XmlCharRefValue = cpb.create(); } return props_XmlCharRefValue; case LanguageConceptSwitch.XmlComment: if (props_XmlComment == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlComment = cpb.create(); } return props_XmlComment; case LanguageConceptSwitch.XmlCommentLine: if (props_XmlCommentLine == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlCommentLine = cpb.create(); } return props_XmlCommentLine; case LanguageConceptSwitch.XmlContent: if (props_XmlContent == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlContent = cpb.create(); } return props_XmlContent; case LanguageConceptSwitch.XmlDeclaration: if (props_XmlDeclaration == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("xml declaration"); props_XmlDeclaration = cpb.create(); } return props_XmlDeclaration; case LanguageConceptSwitch.XmlDoctypeDeclaration: if (props_XmlDoctypeDeclaration == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("xml doctype declaration"); props_XmlDoctypeDeclaration = cpb.create(); } return props_XmlDoctypeDeclaration; case LanguageConceptSwitch.XmlDocument: if (props_XmlDocument == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlDocument = cpb.create(); } return props_XmlDocument; case LanguageConceptSwitch.XmlElement: if (props_XmlElement == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlElement = cpb.create(); } return props_XmlElement; case LanguageConceptSwitch.XmlEntityRef: if (props_XmlEntityRef == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("entity reference"); props_XmlEntityRef = cpb.create(); } return props_XmlEntityRef; case LanguageConceptSwitch.XmlEntityRefValue: if (props_XmlEntityRefValue == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("entity reference"); props_XmlEntityRefValue = cpb.create(); } return props_XmlEntityRefValue; case LanguageConceptSwitch.XmlExternalId: if (props_XmlExternalId == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlExternalId = cpb.create(); } return props_XmlExternalId; case LanguageConceptSwitch.XmlFile: if (props_XmlFile == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlFile = cpb.create(); } return props_XmlFile; case LanguageConceptSwitch.XmlNoSpaceValue: if (props_XmlNoSpaceValue == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("concatenates two values without spaces"); props_XmlNoSpaceValue = cpb.create(); } return props_XmlNoSpaceValue; case LanguageConceptSwitch.XmlPart: if (props_XmlPart == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlPart = cpb.create(); } return props_XmlPart; case LanguageConceptSwitch.XmlProcessingInstruction: if (props_XmlProcessingInstruction == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("processing instruction"); props_XmlProcessingInstruction = cpb.create(); } return props_XmlProcessingInstruction; case LanguageConceptSwitch.XmlProlog: if (props_XmlProlog == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlProlog = cpb.create(); } return props_XmlProlog; case LanguageConceptSwitch.XmlPrologElement: if (props_XmlPrologElement == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlPrologElement = cpb.create(); } return props_XmlPrologElement; case LanguageConceptSwitch.XmlText: if (props_XmlText == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("plain text"); props_XmlText = cpb.create(); } return props_XmlText; case LanguageConceptSwitch.XmlTextValue: if (props_XmlTextValue == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("attribute value contains of text and entity references"); props_XmlTextValue = cpb.create(); } return props_XmlTextValue; case LanguageConceptSwitch.XmlValuePart: if (props_XmlValuePart == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); cpb.shortDesc("attribute value"); props_XmlValuePart = cpb.create(); } return props_XmlValuePart; case LanguageConceptSwitch.XmlWhitespace: if (props_XmlWhitespace == null) { ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); props_XmlWhitespace = cpb.create(); } return props_XmlWhitespace; } return null; } }