package jetbrains.mps.baseLanguage.closures.editor; /*Generated by MPS */ import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase; import org.jetbrains.annotations.NotNull; import java.util.Collection; import jetbrains.mps.openapi.editor.descriptor.ConceptEditor; import org.jetbrains.mps.openapi.language.SAbstractConcept; import java.util.Collections; import jetbrains.mps.openapi.editor.descriptor.TransformationMenu; import jetbrains.mps.openapi.editor.descriptor.NamedMenuId; import java.util.Arrays; import jetbrains.mps.openapi.editor.descriptor.SubstituteMenu; import jetbrains.mps.lang.smodel.ConceptSwitchIndex; import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase { @NotNull public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) { SAbstractConcept cncpt_a0a = ((SAbstractConcept) concept); switch (index_xbvbvu_a0a.index(cncpt_a0a)) { case 0: return Collections.<ConceptEditor>singletonList(new AbstractFunctionType_Editor()); case 1: return Collections.<ConceptEditor>singletonList(new ClosureArgReference_Editor()); case 2: return Collections.<ConceptEditor>singletonList(new ClosureControlStatement_Editor()); case 3: return Collections.<ConceptEditor>singletonList(new ClosureLiteral_Editor()); case 4: return Collections.<ConceptEditor>singletonList(new ClosureLiteralType_Editor()); case 5: return Collections.<ConceptEditor>singletonList(new CompactInvokeFunctionExpression_Editor()); case 6: return Collections.<ConceptEditor>singletonList(new ControlAbstractionContainer_Editor()); case 7: return Collections.<ConceptEditor>singletonList(new ControlAbstractionDeclaration_Editor()); case 8: return Collections.<ConceptEditor>singletonList(new ControlClosureLiteral_Editor()); case 9: return Collections.<ConceptEditor>singletonList(new FunctionMethodDeclaration_Editor()); case 10: return Collections.<ConceptEditor>singletonList(new FunctionType_Editor()); case 11: return Collections.<ConceptEditor>singletonList(new InvokeExpression_Editor()); case 12: return Collections.<ConceptEditor>singletonList(new InvokeFunctionExpression_Editor()); case 13: return Collections.<ConceptEditor>singletonList(new InvokeFunctionOperation_Editor()); case 14: return Collections.<ConceptEditor>singletonList(new UnboundClosureParameterDeclaration_Editor()); case 15: return Collections.<ConceptEditor>singletonList(new UnrestrictedClosureLiteral_Editor()); case 16: return Collections.<ConceptEditor>singletonList(new UnrestrictedFunctionType_Editor()); case 17: return Collections.<ConceptEditor>singletonList(new YieldAllStatement_Editor()); case 18: return Collections.<ConceptEditor>singletonList(new YieldStatement_Editor()); default: } return Collections.<ConceptEditor>emptyList(); } @NotNull @Override public Collection<TransformationMenu> getDeclaredDefaultTransformationMenus(SAbstractConcept concept) { SAbstractConcept cncpt_a0d = concept; switch (index_xbvbvu_a0d.index(cncpt_a0d)) { case 0: return Collections.<TransformationMenu>singletonList(new ClosureControlStatement_TransformationMenu()); case 1: return Collections.<TransformationMenu>singletonList(new Expression_default_RTransform_Contribution()); case 2: return Collections.<TransformationMenu>singletonList(new Type_default_RTransform_Contribution()); default: } return Collections.<TransformationMenu>emptyList(); } @NotNull @Override public Collection<TransformationMenu> getDeclaredNamedTransformationMenus(NamedMenuId menuId) { SAbstractConcept cncpt_a0e = (SAbstractConcept) menuId.getConcept(); switch (index_xbvbvu_a0e.index(cncpt_a0e)) { case 0: if (true) { switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0a1a4, menuId.getFqName())) { case 0: return Arrays.asList(new TransformationMenu[]{new add_parameter_to_ControlClosure()}); case 1: return Arrays.asList(new TransformationMenu[]{new compact_invoke()}); default: } } break; case 1: if (true) { switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0b1a4, menuId.getFqName())) { case 0: return Arrays.asList(new TransformationMenu[]{new transform_FunctionType_to_ClassifierLiteralType()}); default: } } break; case 2: if (true) { switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0c1a4, menuId.getFqName())) { case 0: return Arrays.asList(new TransformationMenu[]{new add_throw_to_ClosureLiteralType()}); case 1: return Arrays.asList(new TransformationMenu[]{new add_throw_to_FunctionType()}); default: } } break; default: } return Collections.<TransformationMenu>emptyList(); } @NotNull @Override public Collection<SubstituteMenu> getDeclaredDefaultSubstituteMenus(SAbstractConcept concept) { SAbstractConcept cncpt_a0f = concept; switch (index_xbvbvu_a0f.index(cncpt_a0f)) { case 0: return Collections.<SubstituteMenu>singletonList(new ClosureControlStatement_SubstituteMenu()); case 1: return Collections.<SubstituteMenu>singletonList(new ClosureLiteralType_SubstituteMenu()); case 2: return Collections.<SubstituteMenu>singletonList(new CompactInvokeFunctionExpression_SubstituteMenu()); case 3: return Collections.<SubstituteMenu>singletonList(new ControlAbstractionContainer_SubstituteMenu()); case 4: return Collections.<SubstituteMenu>singletonList(new subs_InvokeFunction_Contribution()); case 5: return Collections.<SubstituteMenu>singletonList(new InvokeExpression_SubstituteMenu()); case 6: return Collections.<SubstituteMenu>singletonList(new InvokeFunctionExpression_SubstituteMenu()); case 7: return Collections.<SubstituteMenu>singletonList(new Statement_Contribution()); case 8: return Collections.<SubstituteMenu>singletonList(new subs_ThisExpression_Contribution()); case 9: return Collections.<SubstituteMenu>singletonList(new UnboundClosureParameterDeclaration_SubstituteMenu()); case 10: return Collections.<SubstituteMenu>singletonList(new YieldAllStatement_SubstituteMenu()); case 11: return Collections.<SubstituteMenu>singletonList(new YieldStatement_SubstituteMenu()); default: } return Collections.<SubstituteMenu>emptyList(); } @NotNull @Override public Collection<SubstituteMenu> getDeclaredNamedSubstituteMenus(NamedMenuId menuId) { SAbstractConcept cncpt_a0g = (SAbstractConcept) menuId.getConcept(); switch (index_xbvbvu_a0g.index(cncpt_a0g)) { case 0: if (true) { switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0a1a6, menuId.getFqName())) { case 0: return Arrays.asList(new SubstituteMenu[]{new remove_ReturnStatement()}); case 1: return Arrays.asList(new SubstituteMenu[]{new subsitute_ClosureControlStatement()}); default: } } break; default: } return Collections.<SubstituteMenu>emptyList(); } private static final ConceptSwitchIndex index_xbvbvu_a0a = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x4de23a15f719357dL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x5620d42a452422c7L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49cfed99L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174bed3125L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0xe8770ba07b68051L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11fb8425aa8L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49db3870L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49dc8097L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49d1841dL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x42d79e63a78a7784L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a4d19ffL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x117545d385aL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a964795L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11d67349093L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x118276b7086L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49cdf7cbL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e505b9d83L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e25fc6c63L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11797183e82L)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0d = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49cfed99L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0e = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a4d19ffL), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0f = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49cfed99L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0xe8770ba07b68051L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11fb8425aa8L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e49db3870L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x117545d385aL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a964795L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L), MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d4da00cL), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x118276b7086L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11e25fc6c63L), MetaIdFactory.conceptId(0xfd3920347849419dL, 0x907112563d152375L, 0x11797183e82L)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0g = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L)).seal(); private static String[] stringSwitchCases_xbvbvu_a0a0a0a1a4 = new String[]{"jetbrains.mps.baseLanguage.closures.editor.add_parameter_to_ControlClosure", "jetbrains.mps.baseLanguage.closures.editor.compact_invoke"}; private static String[] stringSwitchCases_xbvbvu_a0a0a0b1a4 = new String[]{"jetbrains.mps.baseLanguage.closures.editor.transform_FunctionType_to_ClassifierLiteralType"}; private static String[] stringSwitchCases_xbvbvu_a0a0a0c1a4 = new String[]{"jetbrains.mps.baseLanguage.closures.editor.add_throw_to_ClosureLiteralType", "jetbrains.mps.baseLanguage.closures.editor.add_throw_to_FunctionType"}; private static String[] stringSwitchCases_xbvbvu_a0a0a0a1a6 = new String[]{"jetbrains.mps.baseLanguage.closures.editor.remove_ReturnStatement", "jetbrains.mps.baseLanguage.closures.editor.subsitute_ClosureControlStatement"}; }