package jetbrains.mps.samples.heating.tabular.editor; /*Generated by MPS */ import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase; import jetbrains.mps.openapi.editor.descriptor.EditorHintsProvider; import java.util.Collection; import jetbrains.mps.openapi.editor.descriptor.ConceptEditorHint; import java.util.Arrays; import jetbrains.mps.editor.runtime.desctiptor.ConceptEditorHintImpl; import org.jetbrains.annotations.NotNull; 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 jetbrains.mps.lang.smodel.ConceptSwitchIndex; import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase implements EditorHintsProvider { private Collection<ConceptEditorHint> myHints = Arrays.<ConceptEditorHint>asList(new ConceptEditorHintImpl("tabular", "", true, "jetbrains.mps.samples.heating.tabular.editor.HeatingViews.tabular")); @NotNull public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) { SAbstractConcept cncpt_a0b = ((SAbstractConcept) concept); switch (index_xbvbvu_a0b.index(cncpt_a0b)) { case 0: return Collections.<ConceptEditor>singletonList(new ChangeEvent_tabular_Editor()); case 1: return Collections.<ConceptEditor>singletonList(new DailyPlan_tabular_Editor()); case 2: return Collections.<ConceptEditor>singletonList(new HeatingPlan_tabular_Editor()); case 3: return Collections.<ConceptEditor>singletonList(new Slot_tabular_Editor()); default: } return Collections.<ConceptEditor>emptyList(); } public Collection<ConceptEditorHint> getHints() { return myHints; } @NotNull @Override public Collection<TransformationMenu> getDeclaredNamedTransformationMenus(NamedMenuId menuId) { SAbstractConcept cncpt_a0f = (SAbstractConcept) menuId.getConcept(); switch (index_xbvbvu_a0f.index(cncpt_a0f)) { case 0: if (true) { switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0a1a5, menuId.getFqName())) { case 0: return Arrays.asList(new TransformationMenu[]{new DailyPlan_ApplySideTransforms()}); default: } } break; default: } return Collections.<TransformationMenu>emptyList(); } private static final ConceptSwitchIndex index_xbvbvu_a0b = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xa7d67633e8d9473bL, 0x98ce995a7aa66941L, 0x4644aa4ce08aec62L), MetaIdFactory.conceptId(0xa7d67633e8d9473bL, 0x98ce995a7aa66941L, 0x4644aa4ce08aec4fL), MetaIdFactory.conceptId(0xa7d67633e8d9473bL, 0x98ce995a7aa66941L, 0x4644aa4ce08aa3f2L), MetaIdFactory.conceptId(0xa7d67633e8d9473bL, 0x98ce995a7aa66941L, 0x4f786d85fe288176L)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0f = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xa7d67633e8d9473bL, 0x98ce995a7aa66941L, 0x4644aa4ce08aec4fL)).seal(); private static String[] stringSwitchCases_xbvbvu_a0a0a0a1a5 = new String[]{"jetbrains.mps.samples.heating.tabular.editor.DailyPlan_ApplySideTransforms"}; }