package jetbrains.mps.lang.editor.test.generation.editor; /*Generated by MPS */ import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; import org.jetbrains.annotations.NotNull; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.openapi.editor.cells.EditorCell; import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.editor.runtime.style.FocusPolicy; import jetbrains.mps.lang.editor.menus.transformation.NamedTransformationMenuLookup; import jetbrains.mps.smodel.language.LanguageRegistry; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.nodeEditor.cellMenu.CompositeSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SubstituteInfoPartExt; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfoPartEx; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_Generic_Group; import java.util.List; import jetbrains.mps.smodel.IOperationContext; import org.jetbrains.mps.openapi.model.SModel; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_ReplaceNode_Group; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_ApplySideTransforms; import jetbrains.mps.nodeEditor.CellSide; import jetbrains.mps.openapi.editor.cells.SubstituteAction; import jetbrains.mps.nodeEditor.cellMenu.CellContext; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_Generic_Item; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_PropertyPostfixHints; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_PropertyValues; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_ReplaceNode_CustomNodeConcept; import org.jetbrains.mps.openapi.language.SAbstractConcept; /*package*/ class TransactionalProperty_EditorCellModel_ComponentBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public TransactionalProperty_EditorCellModel_ComponentBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_vfuuik_a(); } private EditorCell createCollection_vfuuik_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_vfuuik_a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); if (nodeCondition_vfuuik_a0a()) { editorCell.addEditorCell(createProperty_vfuuik_a0()); } return editorCell; } private boolean nodeCondition_vfuuik_a0a() { boolean var = getEditorContext() != null || myNode != null; return var; } private EditorCell createProperty_vfuuik_a0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("theProperty"); provider.setNoTargetText("<no theProperty>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("idd"); if (nodeCondition_vfuuik_a0a_0()) { editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.ATTRACTS_RECURSIVELY); } TestTargetActionMap.setCellActions(editorCell, myNode, getEditorContext()); editorCell.addKeyMap(new TestTargetKeymap()); editorCell.setTransformationMenuLookup(new NamedTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde89531a681a1L, "jetbrains.mps.lang.editor.test.generation.structure.AbstractCellTest"), "jetbrains.mps.lang.editor.test.generation.editor.TestTargetTransformationMenu")); editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_generic_cellMenu_vfuuik_a0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_generic_cellMenu_vfuuik_b0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_customReplace_cellMenu_vfuuik_c0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_customReplace_cellMenu_vfuuik_d0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.ApplySideTransforms_left_cellMenu_vfuuik_e0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_component_cellMenu_vfuuik_f0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_generic_cellMenu_vfuuik_g0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_theProperty_postfixCellMenu_vfuuik_h0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.TransactionalProperty_theProperty_cellMenu_vfuuik_i0a0(), new TransactionalProperty_EditorCellModel_ComponentBuilder_a.ReplaceWith_Constant_cellMenu_vfuuik_j0a0(), new SChildSubstituteInfoPartEx(editorCell)})); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private boolean nodeCondition_vfuuik_a0a_0() { boolean var = getEditorContext() != null || myNode != null; return var; } public static class TransactionalProperty_generic_cellMenu_vfuuik_a0a0 extends AbstractCellMenuPart_Generic_Group { public TransactionalProperty_generic_cellMenu_vfuuik_a0a0() { } public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) { boolean var = operationContext != null || node != null || editorContext != null; return (var ? null : null); } protected void handleAction(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { this.handleAction_impl((String) parameterObject, node, model, operationContext, editorContext); } public void handleAction_impl(String parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { boolean var = parameterObject != null || node != null || model != null || editorContext != null || operationContext != null; if (var) { // just usage of var } } public boolean isReferentPresentation() { return false; } } public static class TransactionalProperty_generic_cellMenu_vfuuik_b0a0 extends AbstractCellMenuPart_Generic_Group { public TransactionalProperty_generic_cellMenu_vfuuik_b0a0() { } public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) { return null; } protected void handleAction(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { this.handleAction_impl((String) parameterObject, node, model, operationContext, editorContext); } public void handleAction_impl(String parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { } public boolean isReferentPresentation() { return false; } public String getMatchingText(Object parameterObject) { return this.getMatchingText_internal((String) parameterObject); } public String getMatchingText_internal(String parameterObject) { return String.valueOf(parameterObject); } public String getDescriptionText(Object parameterObject) { return this.getDescriptionText_internal((String) parameterObject); } public String getDescriptionText_internal(String parameterObject) { return String.valueOf(parameterObject); } } public static class TransactionalProperty_customReplace_cellMenu_vfuuik_c0a0 extends AbstractCellMenuPart_ReplaceNode_Group { public TransactionalProperty_customReplace_cellMenu_vfuuik_c0a0() { } public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) { boolean var = operationContext != null || node != null || editorContext != null; return (var ? null : null); } public SNode createReplacementNode(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { return createReplacementNode_impl((String) parameterObject, node, model, operationContext, editorContext); } public SNode createReplacementNode_impl(String parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { boolean var = parameterObject != null || node != null || model != null || editorContext != null || operationContext != null; return (var ? null : null); } public boolean isReferentPresentation() { return false; } } public static class TransactionalProperty_customReplace_cellMenu_vfuuik_d0a0 extends AbstractCellMenuPart_ReplaceNode_Group { public TransactionalProperty_customReplace_cellMenu_vfuuik_d0a0() { } public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) { return null; } public SNode createReplacementNode(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { return createReplacementNode_impl((String) parameterObject, node, model, operationContext, editorContext); } public SNode createReplacementNode_impl(String parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { return null; } public boolean isReferentPresentation() { return false; } public String getMatchingText(Object parameterObject) { return this.getMatchingText_internal((String) parameterObject); } public String getMatchingText_internal(String parameterObject) { return String.valueOf(parameterObject); } public String getDescriptionText(Object parameterObject) { return this.getDescriptionText_internal((String) parameterObject); } public String getDescriptionText_internal(String parameterObject) { return String.valueOf(parameterObject); } } public static class ApplySideTransforms_left_cellMenu_vfuuik_e0a0 extends AbstractCellMenuPart_ApplySideTransforms { public ApplySideTransforms_left_cellMenu_vfuuik_e0a0() { super(CellSide.LEFT, "ext_1_RTransform"); } } public static class TransactionalProperty_component_cellMenu_vfuuik_f0a0 implements SubstituteInfoPartExt { private TestTargetMenuComponent myComponent; public TransactionalProperty_component_cellMenu_vfuuik_f0a0() { this.myComponent = new TestTargetMenuComponent(); } public List<SubstituteAction> createActions(CellContext cellContext, EditorContext editorContext) { return this.myComponent.createSubstituteActions(cellContext, editorContext); } } public static class TransactionalProperty_generic_cellMenu_vfuuik_g0a0 extends AbstractCellMenuPart_Generic_Item { public TransactionalProperty_generic_cellMenu_vfuuik_g0a0() { } public void handleAction(SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) { boolean var = node != null || model != null || editorContext != null || operationContext != null; if (var) { // just usage of var } } public String getMatchingText() { return "matchingText"; } } public static class TransactionalProperty_theProperty_postfixCellMenu_vfuuik_h0a0 extends AbstractCellMenuPart_PropertyPostfixHints { public TransactionalProperty_theProperty_postfixCellMenu_vfuuik_h0a0() { } public List<String> getPostfixes(SNode node, IOperationContext operationContext, EditorContext editorContext) { boolean var = node != null || operationContext != null; return (var ? null : null); } } public static class TransactionalProperty_theProperty_cellMenu_vfuuik_i0a0 extends AbstractCellMenuPart_PropertyValues { public TransactionalProperty_theProperty_cellMenu_vfuuik_i0a0() { } public List<String> getPropertyValues(SNode node, IOperationContext operationContext, EditorContext editorContext) { boolean var = operationContext != null || node != null; return (var ? null : null); } } public static class ReplaceWith_Constant_cellMenu_vfuuik_j0a0 extends AbstractCellMenuPart_ReplaceNode_CustomNodeConcept { public ReplaceWith_Constant_cellMenu_vfuuik_j0a0() { } public SAbstractConcept getReplacementConcept() { return MetaAdapterFactory.getConcept(0xeaa98d49af584b80L, 0xb585c05e7b5fd335L, 0xbde8953186ee02L, "jetbrains.mps.lang.editor.test.generation.structure.Constant"); } } }