package jetbrains.mps.lang.editor.test.generation.editor;
/*Generated by MPS */
import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase;
import jetbrains.mps.openapi.editor.descriptor.EditorHintsProvider;
import jetbrains.mps.openapi.editor.descriptor.StyleAttributeProvider;
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.ConceptEditorComponent;
import jetbrains.mps.openapi.editor.style.StyleAttribute;
import jetbrains.mps.editor.runtime.style.InheritableStyleAttribute;
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, StyleAttributeProvider {
private Collection<ConceptEditorHint> myHints = Arrays.<ConceptEditorHint>asList(new ConceptEditorHintImpl("HINT1", "H1", true, "jetbrains.mps.lang.editor.test.generation.editor.TestTargetHints.HINT1"), new ConceptEditorHintImpl("Hint2", "H2", true, "jetbrains.mps.lang.editor.test.generation.editor.TestTargetHints.Hint2"));
@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 Constant_Editor());
case 1:
return Collections.<ConceptEditor>singletonList(new Error_Editor());
case 2:
return Collections.<ConceptEditor>singletonList(new ModelAccess_Editor());
case 3:
return Collections.<ConceptEditor>singletonList(new ReadOnlyModelAccessor_Editor());
case 4:
return Collections.<ConceptEditor>singletonList(new RefNodeList_Editor());
case 5:
return Collections.<ConceptEditor>singletonList(new TransactionalProperty_Editor());
default:
}
return Collections.<ConceptEditor>emptyList();
}
@NotNull
public Collection<ConceptEditorComponent> getDeclaredEditorComponents(SAbstractConcept concept, String editorComponentId) {
SAbstractConcept cncpt_a0d = ((SAbstractConcept) concept);
switch (index_xbvbvu_a0d.index(cncpt_a0d)) {
case 0:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0a1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new Constant_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new Constant_EditorCellModel());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new Constant_ICellStyle());
case 3:
return Collections.<ConceptEditorComponent>singletonList(new Constant_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 1:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0b1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new Error_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new Error_EditorCellModel());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new Error_ICellStyle());
case 3:
return Collections.<ConceptEditorComponent>singletonList(new Error_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 2:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0c1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new ModelAccess_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new ModelAccess_EditorCellModel());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new ModelAccess_ICellStyle());
case 3:
return Collections.<ConceptEditorComponent>singletonList(new ModelAccess_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 3:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0d1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new Property_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new Property_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 4:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0e1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new ReadOnlyModelAccessor_EditorCellModel());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new ReadOnlyModelAccessor_ICellStyle());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new ReadOnlyModelAccessor_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 5:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0f1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new RefNodeList_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new RefNodeList_EditorCellModel());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new RefNodeList_ICelllStyle());
case 3:
return Collections.<ConceptEditorComponent>singletonList(new RefNodeList_IStyleContainer());
case 4:
return Collections.<ConceptEditorComponent>singletonList(new RefNodeList_ListWithRole());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
case 6:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0g1a3, editorComponentId)) {
case 0:
return Collections.<ConceptEditorComponent>singletonList(new TransactionalProperty_Default());
case 1:
return Collections.<ConceptEditorComponent>singletonList(new TransactionalProperty_EditorCellModel());
case 2:
return Collections.<ConceptEditorComponent>singletonList(new TransactionalProperty_ICellStyle());
case 3:
return Collections.<ConceptEditorComponent>singletonList(new TransactionalProperty_IStyleContainer());
default:
return Collections.<ConceptEditorComponent>emptyList();
}
}
break;
default:
}
return Collections.<ConceptEditorComponent>emptyList();
}
public Collection<ConceptEditorHint> getHints() {
return myHints;
}
public StyleAttribute getStyleAttribute(String attributeName) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0g, attributeName)) {
case 0:
return new InheritableStyleAttribute<String>("testStringAttribute", "defaultValue");
default:
return null;
}
}
@NotNull
@Override
public Collection<TransformationMenu> getDeclaredNamedTransformationMenus(NamedMenuId menuId) {
SAbstractConcept cncpt_a0h = (SAbstractConcept) menuId.getConcept();
switch (index_xbvbvu_a0h.index(cncpt_a0h)) {
case 0:
if (true) {
switch (Arrays.binarySearch(stringSwitchCases_xbvbvu_a0a0a0a1a7, menuId.getFqName())) {
case 0:
return Arrays.asList(new TransformationMenu[]{new TestTargetTransformationMenu()});
default:
}
}
break;
default:
}
return Collections.<TransformationMenu>emptyList();
}
private static final ConceptSwitchIndex index_xbvbvu_a0b = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde8953186ee02L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a5a543L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a70c22L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a70c23L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531adc76dL), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531aadcccL)).seal();
private static final ConceptSwitchIndex index_xbvbvu_a0d = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde8953186ee02L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a5a543L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a70c22L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0x34bd237e1c9c3f8bL), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a70c23L), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531adc76dL), MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531aadcccL)).seal();
private static final ConceptSwitchIndex index_xbvbvu_a0h = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a681a1L)).seal();
private static String[] stringSwitchCases_xbvbvu_a0a0a0a1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.Constant_Default", "jetbrains.mps.lang.editor.test.generation.editor.Constant_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.Constant_ICellStyle", "jetbrains.mps.lang.editor.test.generation.editor.Constant_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0b1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.Error_Default", "jetbrains.mps.lang.editor.test.generation.editor.Error_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.Error_ICellStyle", "jetbrains.mps.lang.editor.test.generation.editor.Error_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0c1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.ModelAccess_Default", "jetbrains.mps.lang.editor.test.generation.editor.ModelAccess_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.ModelAccess_ICellStyle", "jetbrains.mps.lang.editor.test.generation.editor.ModelAccess_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0d1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.Property_Default", "jetbrains.mps.lang.editor.test.generation.editor.Property_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0e1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.ReadOnlyModelAccessor_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.ReadOnlyModelAccessor_ICellStyle", "jetbrains.mps.lang.editor.test.generation.editor.ReadOnlyModelAccessor_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0f1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.RefNodeList_Default", "jetbrains.mps.lang.editor.test.generation.editor.RefNodeList_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.RefNodeList_ICelllStyle", "jetbrains.mps.lang.editor.test.generation.editor.RefNodeList_IStyleContainer", "jetbrains.mps.lang.editor.test.generation.editor.RefNodeList_ListWithRole"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0g1a3 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.TransactionalProperty_Default", "jetbrains.mps.lang.editor.test.generation.editor.TransactionalProperty_EditorCellModel", "jetbrains.mps.lang.editor.test.generation.editor.TransactionalProperty_ICellStyle", "jetbrains.mps.lang.editor.test.generation.editor.TransactionalProperty_IStyleContainer"};
private static String[] stringSwitchCases_xbvbvu_a0a0g = new String[]{"testStringAttribute"};
private static String[] stringSwitchCases_xbvbvu_a0a0a0a1a7 = new String[]{"jetbrains.mps.lang.editor.test.generation.editor.TestTargetTransformationMenu"};
}