package jetbrains.mps.sampleXML.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.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 Attribute_Editor()); case 1: return Collections.<ConceptEditor>singletonList(new Document_Editor()); case 2: return Collections.<ConceptEditor>singletonList(new Element_Editor()); case 3: return Collections.<ConceptEditor>singletonList(new ElementPart_Editor()); case 4: return Collections.<ConceptEditor>singletonList(new Text_Editor()); default: } return Collections.<ConceptEditor>emptyList(); } @NotNull @Override public Collection<SubstituteMenu> getDeclaredDefaultSubstituteMenus(SAbstractConcept concept) { SAbstractConcept cncpt_a0d = concept; switch (index_xbvbvu_a0d.index(cncpt_a0d)) { case 0: return Collections.<SubstituteMenu>singletonList(new Attribute_SubstituteMenu()); default: } return Collections.<SubstituteMenu>emptyList(); } private static final ConceptSwitchIndex index_xbvbvu_a0a = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8a1L), MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8b6L), MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8b9L), MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8beL), MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8c1L)).seal(); private static final ConceptSwitchIndex index_xbvbvu_a0d = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8a1L)).seal(); }