package jetbrains.mps.baseLanguage.collections.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: AbstractContainerCreator intentions = new IntentionFactory[2]; intentions[0] = new add_init_values_Intention(); intentions[1] = new add_copy_from_Intention(); } break; case 1: if (true) { // Concept: AddAllSetElementsOperation intentions = new IntentionFactory[1]; intentions[0] = new AddAllSetElementsOperation_replace_Intention(); } break; case 2: if (true) { // Concept: AddSetElementOperation intentions = new IntentionFactory[1]; intentions[0] = new AddSetElementOperation_replace_Intention(); } break; case 3: if (true) { // Concept: Expression intentions = new IntentionFactory[1]; intentions[0] = new IterateOverSequence_Intention(); } break; case 4: if (true) { // Concept: ForEachStatement intentions = new IntentionFactory[2]; intentions[0] = new ConvertForEachStatementToForeachStatement_Intention(); intentions[1] = new ConvertToMultiForeach_Intention(); } break; case 5: if (true) { // Concept: ForeachStatement intentions = new IntentionFactory[1]; intentions[0] = new ConvertForeachStatementToForEach_Intention(); } break; case 6: if (true) { // Concept: HashMapCreator intentions = new IntentionFactory[1]; intentions[0] = new CreateInitializer_Intention(); } break; case 7: if (true) { // Concept: RemoveAllSetElementsOperation intentions = new IntentionFactory[1]; intentions[0] = new RemoveAllSetElementsOperation_replace_Intention(); } break; case 8: if (true) { // Concept: RemoveSetElementOperation intentions = new IntentionFactory[1]; intentions[0] = new RemoveSetElementOperation_replace_Intention(); } break; case 9: if (true) { // Concept: SequenceCreator intentions = new IntentionFactory[1]; intentions[0] = new add_sequence_initializer_Intention(); } break; case 10: if (true) { // Concept: TreeSetCreator intentions = new IntentionFactory[1]; intentions[0] = new Add_Comparator_Intention(); } break; default: } myCached.put(concept, intentions); return Arrays.asList(intentions); } @NotNull @Override public Collection<IntentionFactory> getAllIntentions() { IntentionFactory[] rv = new IntentionFactory[13]; rv[0] = new ConvertForEachStatementToForeachStatement_Intention(); rv[1] = new CreateInitializer_Intention(); rv[2] = new add_init_values_Intention(); rv[3] = new add_copy_from_Intention(); rv[4] = new add_sequence_initializer_Intention(); rv[5] = new Add_Comparator_Intention(); rv[6] = new IterateOverSequence_Intention(); rv[7] = new RemoveSetElementOperation_replace_Intention(); rv[8] = new AddSetElementOperation_replace_Intention(); rv[9] = new AddAllSetElementsOperation_replace_Intention(); rv[10] = new RemoveAllSetElementsOperation_replace_Intention(); rv[11] = new ConvertForeachStatementToForEach_Intention(); rv[12] = new ConvertToMultiForeach_Intention(); return Arrays.asList(rv); } private static final ConceptSwitchIndex index_hphjzv_d0f = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x1202df1ada0L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x11d969dca87L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x11d9514ebd8L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10cac65f399L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10a6933ce33L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x116dbb34f2dL), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x11d96b14ae4L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x11d968cae32L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x11d14c97b16L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x120c4838d33L)).seal(); }