package jetbrains.mps.lang.structure.intentions; /*Generated by MPS */ import jetbrains.mps.intentions.AbstractIntentionAspectDescriptor; import jetbrains.mps.openapi.intentions.IntentionFactory; import java.util.Map; import org.jetbrains.mps.openapi.language.SAbstractConcept; import java.util.HashMap; import org.jetbrains.annotations.Nullable; import java.util.Collection; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import jetbrains.mps.lang.smodel.ConceptSwitchIndex; import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; public final class IntentionsDescriptor extends AbstractIntentionAspectDescriptor { private static final IntentionFactory[] EMPTY_ARRAY = new IntentionFactory[0]; private Map<SAbstractConcept, IntentionFactory[]> myCached = new HashMap<SAbstractConcept, IntentionFactory[]>(); public IntentionsDescriptor() { } @Nullable public Collection<IntentionFactory> getIntentions(@NotNull SAbstractConcept concept) { if (myCached.containsKey(concept)) { return Arrays.asList(myCached.get(concept)); } IntentionFactory[] intentions = EMPTY_ARRAY; SAbstractConcept cncpt_d0f = concept; switch (index_hphjzv_d0f.index(cncpt_d0f)) { case 0: if (true) { // Concept: AbstractConceptDeclaration intentions = new IntentionFactory[1]; intentions[0] = new ForbidIncomingReferencesInSubconcepts_Intention(); } break; case 1: if (true) { // Concept: ConceptDeclaration intentions = new IntentionFactory[4]; intentions[0] = new MakeRootable_Intention(); intentions[1] = new MakeFinal_Intention(); intentions[2] = new MakeAbstract_Intention(); intentions[3] = new CreateConceptIcon_Intention(); } break; case 2: if (true) { // Concept: DocumentationObjective intentions = new IntentionFactory[1]; intentions[0] = new AnnotateToDocument_Intention(); } break; case 3: if (true) { // Concept: DocumentedNodeAnnotation intentions = new IntentionFactory[1]; intentions[0] = new AddSeeAlso_Intention(); } break; case 4: if (true) { // Concept: IStructureDeprecatable intentions = new IntentionFactory[1]; intentions[0] = new AddDeprecatedAnnotation_Intention(); } break; default: } myCached.put(concept, intentions); return Arrays.asList(intentions); } @NotNull @Override public Collection<IntentionFactory> getAllIntentions() { IntentionFactory[] rv = new IntentionFactory[8]; rv[0] = new AddDeprecatedAnnotation_Intention(); rv[1] = new MakeRootable_Intention(); rv[2] = new MakeFinal_Intention(); rv[3] = new MakeAbstract_Intention(); rv[4] = new ForbidIncomingReferencesInSubconcepts_Intention(); rv[5] = new CreateConceptIcon_Intention(); rv[6] = new AnnotateToDocument_Intention(); rv[7] = new AddSeeAlso_Intention(); return Arrays.asList(rv); } private static final ConceptSwitchIndex index_hphjzv_d0f = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL), MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L), MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x6d1df6c2700b0eaeL), MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x6d1df6c2700b0ea9L), MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x11d2ea63881L)).seal(); }