package jetbrains.mps.lang.smodel.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: CastExpression
intentions = new IntentionFactory[1];
intentions[0] = new ConvertCastToNodeCast_Intention();
}
break;
case 1:
if (true) {
// Concept: ConceptFqNameRefExpression
intentions = new IntentionFactory[1];
intentions[0] = new ConceptName2Concept_Intention();
}
break;
case 2:
if (true) {
// Concept: ConceptNodeType
intentions = new IntentionFactory[2];
intentions[0] = new ConceptNodeType2SConceptType_Intention();
intentions[1] = new ConceptNodeType2NodeType_Intention();
}
break;
case 3:
if (true) {
// Concept: ConceptRefExpression
intentions = new IntentionFactory[1];
intentions[0] = new ConceptRef2Concept_Intention();
}
break;
case 4:
if (true) {
// Concept: IfStatement
intentions = new IntentionFactory[1];
intentions[0] = new AddSNodeCastStatement_Intention();
}
break;
case 5:
if (true) {
// Concept: InstanceOfExpression
intentions = new IntentionFactory[1];
intentions[0] = new ConvertInstanceofToNodeInstanceof_Intention();
}
break;
case 6:
if (true) {
// Concept: LinkNameRefExpression
intentions = new IntentionFactory[1];
intentions[0] = new LinkName2Link_Intention();
}
break;
case 7:
if (true) {
// Concept: LinkRefExpression
intentions = new IntentionFactory[1];
intentions[0] = new LinkRef2Link_Intention();
}
break;
case 8:
if (true) {
// Concept: Link_SetTargetOperation
intentions = new IntentionFactory[1];
intentions[0] = new ConvertLinkSetToAssignment_Intention();
}
break;
case 9:
if (true) {
// Concept: ListType
intentions = new IntentionFactory[1];
intentions[0] = new Replace_ListType_withNodeListType_Intention();
}
break;
case 10:
if (true) {
// Concept: Node_GetConceptOperation
intentions = new IntentionFactory[1];
intentions[0] = new ConvertConceptNodeToSCOncept_Intention();
}
break;
case 11:
if (true) {
// Concept: OperationParm_Concept
intentions = new IntentionFactory[1];
intentions[0] = new ReplaceConceptIsWithConceptEquals_Intention();
}
break;
case 12:
if (true) {
// Concept: PropertyNameRefExpression
intentions = new IntentionFactory[1];
intentions[0] = new PropertyName2Property_Intention();
}
break;
case 13:
if (true) {
// Concept: Property_SetOperation
intentions = new IntentionFactory[1];
intentions[0] = new ConvertPropertySetToAssignment_Intention();
}
break;
case 14:
if (true) {
// Concept: SNodeOperation
intentions = new IntentionFactory[1];
intentions[0] = new AddOperationParameter_Intention();
}
break;
case 15:
if (true) {
// Concept: SNodeTypeCastExpression
intentions = new IntentionFactory[2];
intentions[0] = new ChangeAsCast_Intention();
intentions[1] = new ConvertCastToSConceptType_Intention();
}
break;
default:
}
myCached.put(concept, intentions);
return Arrays.asList(intentions);
}
@NotNull
@Override
public Collection<IntentionFactory> getAllIntentions() {
IntentionFactory[] rv = new IntentionFactory[18];
rv[0] = new AddSNodeCastStatement_Intention();
rv[1] = new ReplaceConceptIsWithConceptEquals_Intention();
rv[2] = new Replace_ListType_withNodeListType_Intention();
rv[3] = new AddOperationParameter_Intention();
rv[4] = new ConvertPropertySetToAssignment_Intention();
rv[5] = new ConvertLinkSetToAssignment_Intention();
rv[6] = new ChangeAsCast_Intention();
rv[7] = new ConvertCastToNodeCast_Intention();
rv[8] = new ConvertInstanceofToNodeInstanceof_Intention();
rv[9] = new LinkRef2Link_Intention();
rv[10] = new LinkName2Link_Intention();
rv[11] = new ConceptRef2Concept_Intention();
rv[12] = new ConceptName2Concept_Intention();
rv[13] = new ConceptNodeType2SConceptType_Intention();
rv[14] = new ConvertCastToSConceptType_Intention();
rv[15] = new ConvertConceptNodeToSCOncept_Intention();
rv[16] = new ConceptNodeType2NodeType_Intention();
rv[17] = new PropertyName2Property_Intention();
return Arrays.asList(rv);
}
private static final ConceptSwitchIndex index_hphjzv_d0f = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940dabe4aL), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x73bd24cca4f91254L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9b63680L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9eb64c6L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b217L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbbff03700L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x48e6e2695189e59aL), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x11d88b27d15L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1099887af60L), MetaIdFactory.conceptId(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x10c25fb076aL), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f3e65fdcL), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x10a61caab68L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x48e6e269518c89f7L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1091d8a1d53L), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1090ea2ebacL), MetaIdFactory.conceptId(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x10975850da7L)).seal();
}