public ConceptPresentation getDescriptor()

in languages/util/regexp/source_gen/jetbrains/mps/baseLanguage/regexp/structure/ConceptPresentationAspectImpl.java [76:524]


  public ConceptPresentation getDescriptor(SAbstractConcept c) {
    StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class);
    switch (structureDescriptor.internalIndex(c)) {
      case LanguageConceptSwitch.AtLeastNTimesRegexp:
        if (props_AtLeastNTimesRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("at least n times");
          cpb.rawPresentation("{n,}");
          props_AtLeastNTimesRegexp = cpb.create();
        }
        return props_AtLeastNTimesRegexp;
      case LanguageConceptSwitch.BinaryRegexp:
        if (props_BinaryRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_BinaryRegexp = cpb.create();
        }
        return props_BinaryRegexp;
      case LanguageConceptSwitch.CharacterSymbolClassPart:
        if (props_CharacterSymbolClassPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("character");
          cpb.rawPresentation("'");
          props_CharacterSymbolClassPart = cpb.create();
        }
        return props_CharacterSymbolClassPart;
      case LanguageConceptSwitch.DotRegexp:
        if (props_DotRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("dot regexp (any character)");
          cpb.rawPresentation(".");
          props_DotRegexp = cpb.create();
        }
        return props_DotRegexp;
      case LanguageConceptSwitch.FindMatchExpression:
        if (props_FindMatchExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("=~");
          props_FindMatchExpression = cpb.create();
        }
        return props_FindMatchExpression;
      case LanguageConceptSwitch.FindMatchStatement:
        if (props_FindMatchStatement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("if (expr =~ regex) {");
          props_FindMatchStatement = cpb.create();
        }
        return props_FindMatchStatement;
      case LanguageConceptSwitch.ForEachMatchStatement:
        if (props_ForEachMatchStatement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("while (expr =~ regex) {");
          props_ForEachMatchStatement = cpb.create();
        }
        return props_ForEachMatchStatement;
      case LanguageConceptSwitch.FromNToMTimesRegexp:
        if (props_FromNToMTimesRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("at least n but not more than m times");
          cpb.rawPresentation("{n,m}");
          props_FromNToMTimesRegexp = cpb.create();
        }
        return props_FromNToMTimesRegexp;
      case LanguageConceptSwitch.InlineRegexpExpression:
        if (props_InlineRegexpExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("/regexp/");
          props_InlineRegexpExpression = cpb.create();
        }
        return props_InlineRegexpExpression;
      case LanguageConceptSwitch.IntersectionSymbolClassPart:
        if (props_IntersectionSymbolClassPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("intersection of classes");
          cpb.rawPresentation("&&");
          props_IntersectionSymbolClassPart = cpb.create();
        }
        return props_IntersectionSymbolClassPart;
      case LanguageConceptSwitch.IntervalSymbolClassPart:
        if (props_IntervalSymbolClassPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("character range");
          cpb.rawPresentation("-");
          props_IntervalSymbolClassPart = cpb.create();
        }
        return props_IntervalSymbolClassPart;
      case LanguageConceptSwitch.LazyPlusRegexp:
        if (props_LazyPlusRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("one or more times, reluctant");
          cpb.rawPresentation("+?");
          props_LazyPlusRegexp = cpb.create();
        }
        return props_LazyPlusRegexp;
      case LanguageConceptSwitch.LazyQuestionRegexp:
        if (props_LazyQuestionRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("once or not at all, reluctant");
          cpb.rawPresentation("??");
          props_LazyQuestionRegexp = cpb.create();
        }
        return props_LazyQuestionRegexp;
      case LanguageConceptSwitch.LazyStarRegexp:
        if (props_LazyStarRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("zero or more times, reluctant");
          cpb.rawPresentation("*?");
          props_LazyStarRegexp = cpb.create();
        }
        return props_LazyStarRegexp;
      case LanguageConceptSwitch.LineEndRegexp:
        if (props_LineEndRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("line end");
          cpb.rawPresentation("$");
          props_LineEndRegexp = cpb.create();
        }
        return props_LineEndRegexp;
      case LanguageConceptSwitch.LineStartRegexp:
        if (props_LineStartRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("line start");
          cpb.rawPresentation("^");
          props_LineStartRegexp = cpb.create();
        }
        return props_LineStartRegexp;
      case LanguageConceptSwitch.LiteralReplacement:
        if (props_LiteralReplacement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("LiteralReplacement");
          props_LiteralReplacement = cpb.create();
        }
        return props_LiteralReplacement;
      case LanguageConceptSwitch.LookRegexp:
        if (props_LookRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_LookRegexp = cpb.create();
        }
        return props_LookRegexp;
      case LanguageConceptSwitch.MatchParensRegexp:
        if (props_MatchParensRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("matching parens");
          cpb.presentationByName();
          props_MatchParensRegexp = cpb.create();
        }
        return props_MatchParensRegexp;
      case LanguageConceptSwitch.MatchRegexpExpression:
        if (props_MatchRegexpExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("matches");
          props_MatchRegexpExpression = cpb.create();
        }
        return props_MatchRegexpExpression;
      case LanguageConceptSwitch.MatchRegexpOperation:
        if (props_MatchRegexpOperation == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("matches");
          props_MatchRegexpOperation = cpb.create();
        }
        return props_MatchRegexpOperation;
      case LanguageConceptSwitch.MatchRegexpStatement:
        if (props_MatchRegexpStatement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("match with regexp");
          cpb.rawPresentation("if (expr matches regexp) {");
          props_MatchRegexpStatement = cpb.create();
        }
        return props_MatchRegexpStatement;
      case LanguageConceptSwitch.MatchVariableReference:
        if (props_MatchVariableReference == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117987ff5eL, 0x11179881f99L, "match", "", "");
          props_MatchVariableReference = cpb.create();
        }
        return props_MatchVariableReference;
      case LanguageConceptSwitch.MatchVariableReferenceRegexp:
        if (props_MatchVariableReferenceRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1118e0a1c55L, 0x1118e0a5335L, "match", "\\", "");
          props_MatchVariableReferenceRegexp = cpb.create();
        }
        return props_MatchVariableReferenceRegexp;
      case LanguageConceptSwitch.MatchVariableReferenceReplacement:
        if (props_MatchVariableReferenceReplacement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c192ab94eL, 0x34ae970c192abbc5L, "match", "\\", "");
          props_MatchVariableReferenceReplacement = cpb.create();
        }
        return props_MatchVariableReferenceReplacement;
      case LanguageConceptSwitch.NTimesRegexp:
        if (props_NTimesRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("exactly n times");
          cpb.rawPresentation("{n}");
          props_NTimesRegexp = cpb.create();
        }
        return props_NTimesRegexp;
      case LanguageConceptSwitch.NegativeLookAheadRegexp:
        if (props_NegativeLookAheadRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("negative look ahead");
          cpb.rawPresentation("(?!");
          props_NegativeLookAheadRegexp = cpb.create();
        }
        return props_NegativeLookAheadRegexp;
      case LanguageConceptSwitch.NegativeLookBehindRegexp:
        if (props_NegativeLookBehindRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("negative look behind");
          cpb.rawPresentation("(?<!");
          props_NegativeLookBehindRegexp = cpb.create();
        }
        return props_NegativeLookBehindRegexp;
      case LanguageConceptSwitch.NegativeSymbolClassRegexp:
        if (props_NegativeSymbolClassRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("negative symbol class");
          cpb.rawPresentation("[^");
          props_NegativeSymbolClassRegexp = cpb.create();
        }
        return props_NegativeSymbolClassRegexp;
      case LanguageConceptSwitch.OrRegexp:
        if (props_OrRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("|");
          props_OrRegexp = cpb.create();
        }
        return props_OrRegexp;
      case LanguageConceptSwitch.ParensRegexp:
        if (props_ParensRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("parens");
          cpb.rawPresentation("(");
          props_ParensRegexp = cpb.create();
        }
        return props_ParensRegexp;
      case LanguageConceptSwitch.PlusRegexp:
        if (props_PlusRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("one or more times");
          cpb.rawPresentation("+");
          props_PlusRegexp = cpb.create();
        }
        return props_PlusRegexp;
      case LanguageConceptSwitch.PositiveLookAheadRegexp:
        if (props_PositiveLookAheadRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("(?=");
          props_PositiveLookAheadRegexp = cpb.create();
        }
        return props_PositiveLookAheadRegexp;
      case LanguageConceptSwitch.PositiveLookBehindRegexp:
        if (props_PositiveLookBehindRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("positive look behind");
          cpb.rawPresentation("(?<=");
          props_PositiveLookBehindRegexp = cpb.create();
        }
        return props_PositiveLookBehindRegexp;
      case LanguageConceptSwitch.PositiveSymbolClassRegexp:
        if (props_PositiveSymbolClassRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("positive symbol class");
          cpb.rawPresentation("[");
          props_PositiveSymbolClassRegexp = cpb.create();
        }
        return props_PositiveSymbolClassRegexp;
      case LanguageConceptSwitch.PredefinedSymbolClassDeclaration:
        if (props_PredefinedSymbolClassDeclaration == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_PredefinedSymbolClassDeclaration = cpb.create();
        }
        return props_PredefinedSymbolClassDeclaration;
      case LanguageConceptSwitch.PredefinedSymbolClassRegexp:
        if (props_PredefinedSymbolClassRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11178fa2a18L, 0x11178fbdc7dL, "symbolClass", "", "");
          props_PredefinedSymbolClassRegexp = cpb.create();
        }
        return props_PredefinedSymbolClassRegexp;
      case LanguageConceptSwitch.PredefinedSymbolClassSymbolClassPart:
        if (props_PredefinedSymbolClassSymbolClassPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117928d9f2L, 0x111792942ceL, "declaration", "", "");
          props_PredefinedSymbolClassSymbolClassPart = cpb.create();
        }
        return props_PredefinedSymbolClassSymbolClassPart;
      case LanguageConceptSwitch.PredefinedSymbolClasses:
        if (props_PredefinedSymbolClasses == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_PredefinedSymbolClasses = cpb.create();
        }
        return props_PredefinedSymbolClasses;
      case LanguageConceptSwitch.QuestionRegexp:
        if (props_QuestionRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("once or not at all");
          cpb.rawPresentation("?");
          props_QuestionRegexp = cpb.create();
        }
        return props_QuestionRegexp;
      case LanguageConceptSwitch.Regexp:
        if (props_Regexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_Regexp = cpb.create();
        }
        return props_Regexp;
      case LanguageConceptSwitch.RegexpDeclaration:
        if (props_RegexpDeclaration == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_RegexpDeclaration = cpb.create();
        }
        return props_RegexpDeclaration;
      case LanguageConceptSwitch.RegexpDeclarationReferenceRegexp:
        if (props_RegexpDeclarationReferenceRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByReference(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117f58ea2aL, 0x1117f594636L, "regexp", "", "");
          props_RegexpDeclarationReferenceRegexp = cpb.create();
        }
        return props_RegexpDeclarationReferenceRegexp;
      case LanguageConceptSwitch.RegexpExpression:
        if (props_RegexpExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_RegexpExpression = cpb.create();
        }
        return props_RegexpExpression;
      case LanguageConceptSwitch.RegexpUsingConstruction:
        if (props_RegexpUsingConstruction == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_RegexpUsingConstruction = cpb.create();
        }
        return props_RegexpUsingConstruction;
      case LanguageConceptSwitch.Regexps:
        if (props_Regexps == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.presentationByName();
          props_Regexps = cpb.create();
        }
        return props_Regexps;
      case LanguageConceptSwitch.ReplaceBlock:
        if (props_ReplaceBlock == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("ReplaceBlock");
          props_ReplaceBlock = cpb.create();
        }
        return props_ReplaceBlock;
      case LanguageConceptSwitch.ReplaceRegexpOperation:
        if (props_ReplaceRegexpOperation == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("s/regexp/replacement/");
          props_ReplaceRegexpOperation = cpb.create();
        }
        return props_ReplaceRegexpOperation;
      case LanguageConceptSwitch.ReplaceWithRegexpExpression:
        if (props_ReplaceWithRegexpExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("replace with regexp");
          props_ReplaceWithRegexpExpression = cpb.create();
        }
        return props_ReplaceWithRegexpExpression;
      case LanguageConceptSwitch.ReplaceWithRegexpOperation:
        if (props_ReplaceWithRegexpOperation == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("replace with regexp");
          cpb.rawPresentation("replace with");
          props_ReplaceWithRegexpOperation = cpb.create();
        }
        return props_ReplaceWithRegexpOperation;
      case LanguageConceptSwitch.Replacement:
        if (props_Replacement == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_Replacement = cpb.create();
        }
        return props_Replacement;
      case LanguageConceptSwitch.SeqRegexp:
        if (props_SeqRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("seq");
          props_SeqRegexp = cpb.create();
        }
        return props_SeqRegexp;
      case LanguageConceptSwitch.SplitExpression:
        if (props_SplitExpression == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("split with regexp");
          cpb.rawPresentation("split with");
          props_SplitExpression = cpb.create();
        }
        return props_SplitExpression;
      case LanguageConceptSwitch.SplitOperation:
        if (props_SplitOperation == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("split with regexp");
          cpb.rawPresentation("split with");
          props_SplitOperation = cpb.create();
        }
        return props_SplitOperation;
      case LanguageConceptSwitch.StarRegexp:
        if (props_StarRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.shortDesc("zero or more times");
          cpb.rawPresentation("*");
          props_StarRegexp = cpb.create();
        }
        return props_StarRegexp;
      case LanguageConceptSwitch.StringLiteralRegexp:
        if (props_StringLiteralRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("'");
          props_StringLiteralRegexp = cpb.create();
        }
        return props_StringLiteralRegexp;
      case LanguageConceptSwitch.SymbolClassPart:
        if (props_SymbolClassPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_SymbolClassPart = cpb.create();
        }
        return props_SymbolClassPart;
      case LanguageConceptSwitch.SymbolClassRegexp:
        if (props_SymbolClassRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_SymbolClassRegexp = cpb.create();
        }
        return props_SymbolClassRegexp;
      case LanguageConceptSwitch.SymbolClassRegexpAndPart:
        if (props_SymbolClassRegexpAndPart == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_SymbolClassRegexpAndPart = cpb.create();
        }
        return props_SymbolClassRegexpAndPart;
      case LanguageConceptSwitch.UnaryRegexp:
        if (props_UnaryRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          props_UnaryRegexp = cpb.create();
        }
        return props_UnaryRegexp;
      case LanguageConceptSwitch.UnicodeCharacterRegexp:
        if (props_UnicodeCharacterRegexp == null) {
          ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
          cpb.rawPresentation("\\uhhhh");
          props_UnicodeCharacterRegexp = cpb.create();
        }
        return props_UnicodeCharacterRegexp;
    }
    return null;
  }