package jetbrains.mps.lang.typesystem.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_Vertical; 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.cells.EditorCell_Constant; import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; import jetbrains.mps.smodel.action.NodeFactoryManager; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; import jetbrains.mps.openapi.editor.cells.CellActionType; import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap; import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; import org.jetbrains.mps.openapi.language.SContainmentLink; import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.CommentStyleClass; /*package*/ class OverloadedOperatorTypeRule_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public OverloadedOperatorTypeRule_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_xc5f9o_a(); } private EditorCell createCollection_xc5f9o_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_xc5f9o_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createCollection_xc5f9o_a0()); editorCell.addEditorCell(createCollection_xc5f9o_b0()); editorCell.addEditorCell(createCollection_xc5f9o_c0()); editorCell.addEditorCell(createConstant_xc5f9o_d0()); editorCell.addEditorCell(createRefNode_xc5f9o_e0()); editorCell.addEditorCell(createConstant_xc5f9o_f0()); editorCell.addEditorCell(createRefNode_xc5f9o_g0()); editorCell.addEditorCell(createConstant_xc5f9o_h0()); return editorCell; } private EditorCell createCollection_xc5f9o_a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_xc5f9o_a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_xc5f9o_a0a()); editorCell.addEditorCell(createRefNodeList_xc5f9o_b0a()); return editorCell; } private EditorCell createConstant_xc5f9o_a0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "operation concepts:"); editorCell.setCellId("Constant_xc5f9o_a0a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNodeList_xc5f9o_b0a() { AbstractCellListHandler handler = new OverloadedOperatorTypeRule_EditorBuilder_a.operationConceptListHandler_xc5f9o_b0a(myNode, "operationConcept", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_operationConcept"); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class operationConceptListHandler_xc5f9o_b0a extends RefNodeListHandler { @NotNull private SNode myNode; public operationConceptListHandler_xc5f9o_b0a(SNode ownerNode, String childRole, EditorContext context) { super(ownerNode, childRole, context, false); myNode = ownerNode; } @Override @NotNull public SNode getNode() { return myNode; } public SNode createNodeToInsert(EditorContext editorContext) { return NodeFactoryManager.createNode(MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x10cd05c601dL, "jetbrains.mps.lang.smodel.structure.ConceptReference"), null, getNode(), getNode().getModel()); } public EditorCell createNodeCell(SNode elementNode) { EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); installElementCellActions(elementNode, elementCell); return elementCell; } public EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(operationConceptListHandler_xc5f9o_b0a.this.getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449dL, "operationConcept"))); try { EditorCell emptyCell = null; emptyCell = super.createEmptyCell(); installElementCellActions(null, emptyCell); setCellContext(emptyCell); return emptyCell; } finally { getCellFactory().popCellContext(); } } public void installElementCellActions(SNode elementNode, EditorCell elementCell) { if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); if (elementNode != null) { elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, "|")); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449dL, "operationConcept"), elementNode)); } } } @Override public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), "|"); editorCell.setSelectable(false); Style style = new StyleImpl(); style.set(StyleAttributes.LAYOUT_CONSTRAINT, ""); style.set(StyleAttributes.PUNCTUATION_LEFT, true); editorCell.getStyle().putAll(style); editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); return editorCell; } } private EditorCell createCollection_xc5f9o_b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_xc5f9o_b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_xc5f9o_a1a()); editorCell.addEditorCell(createRefNode_xc5f9o_b1a()); editorCell.addEditorCell(createConstant_xc5f9o_c1a()); editorCell.addEditorCell(createProperty_xc5f9o_d1a()); if (nodeCondition_xc5f9o_a4b0()) { editorCell.addEditorCell(createCollection_xc5f9o_e1a()); } editorCell.addEditorCell(createConstant_xc5f9o_f1a()); return editorCell; } private boolean nodeCondition_xc5f9o_a4b0() { return !(SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11ff554a52cL, "leftIsExact"))); } private EditorCell createConstant_xc5f9o_a1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "left operand type:"); editorCell.setCellId("Constant_xc5f9o_a1a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_xc5f9o_b1a() { SingleRoleCellProvider provider = new OverloadedOperatorTypeRule_EditorBuilder_a.leftOperandTypeSingleRoleHandler_xc5f9o_b1a(myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b8423L, "leftOperandType"), getEditorContext()); return provider.createCell(); } private static class leftOperandTypeSingleRoleHandler_xc5f9o_b1a extends SingleRoleCellProvider { @NotNull private SNode myNode; public leftOperandTypeSingleRoleHandler_xc5f9o_b1a(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { super(containmentLink, context); myNode = ownerNode; } @Override @NotNull public SNode getNode() { return myNode; } protected EditorCell createChildCell(SNode child) { EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b8423L, "leftOperandType"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b8423L, "leftOperandType"), child)); installCellInfo(child, editorCell); return editorCell; } private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b8423L, "leftOperandType"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("leftOperandType"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b8423L, "leftOperandType"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_leftOperandType"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no leftOperandType>"; } } private EditorCell createConstant_xc5f9o_c1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "is exact:"); editorCell.setCellId("Constant_xc5f9o_c1a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_xc5f9o_d1a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("leftIsExact"); provider.setNoTargetText("<no leftIsExact>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_leftIsExact"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_xc5f9o_e1a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_xc5f9o_e1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_xc5f9o_a4b0()); editorCell.addEditorCell(createProperty_xc5f9o_b4b0()); return editorCell; } private EditorCell createConstant_xc5f9o_a4b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "use strong subtyping"); editorCell.setCellId("Constant_xc5f9o_a4b0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_xc5f9o_b4b0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("leftIsStrong"); provider.setNoTargetText("<no leftIsStrong>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_leftIsStrong"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createConstant_xc5f9o_f1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " "); editorCell.setCellId("Constant_xc5f9o_f1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createCollection_xc5f9o_c0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_xc5f9o_c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_xc5f9o_a2a()); editorCell.addEditorCell(createRefNode_xc5f9o_b2a()); editorCell.addEditorCell(createConstant_xc5f9o_c2a()); editorCell.addEditorCell(createProperty_xc5f9o_d2a()); if (nodeCondition_xc5f9o_a4c0()) { editorCell.addEditorCell(createCollection_xc5f9o_e2a()); } return editorCell; } private boolean nodeCondition_xc5f9o_a4c0() { return !(SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11ff554bf2bL, "rightIsExact"))); } private EditorCell createConstant_xc5f9o_a2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "right operand type:"); editorCell.setCellId("Constant_xc5f9o_a2a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_xc5f9o_b2a() { SingleRoleCellProvider provider = new OverloadedOperatorTypeRule_EditorBuilder_a.rightOperandTypeSingleRoleHandler_xc5f9o_b2a(myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b84c0L, "rightOperandType"), getEditorContext()); return provider.createCell(); } private static class rightOperandTypeSingleRoleHandler_xc5f9o_b2a extends SingleRoleCellProvider { @NotNull private SNode myNode; public rightOperandTypeSingleRoleHandler_xc5f9o_b2a(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { super(containmentLink, context); myNode = ownerNode; } @Override @NotNull public SNode getNode() { return myNode; } protected EditorCell createChildCell(SNode child) { EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b84c0L, "rightOperandType"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b84c0L, "rightOperandType"), child)); installCellInfo(child, editorCell); return editorCell; } private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b84c0L, "rightOperandType"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("rightOperandType"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x11fcc4a641fL, 0x11fcc4b84c0L, "rightOperandType"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_rightOperandType"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no rightOperandType>"; } } private EditorCell createConstant_xc5f9o_c2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "is exact:"); editorCell.setCellId("Constant_xc5f9o_c2a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_xc5f9o_d2a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("rightIsExact"); provider.setNoTargetText("<no rightIsExact>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_rightIsExact"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_xc5f9o_e2a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_xc5f9o_e2a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_xc5f9o_a4c0()); editorCell.addEditorCell(createProperty_xc5f9o_b4c0()); return editorCell; } private EditorCell createConstant_xc5f9o_a4c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "use strong subtyping"); editorCell.setCellId("Constant_xc5f9o_a4c0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_xc5f9o_b4c0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("rightIsStrong"); provider.setNoTargetText("<no rightIsStrong>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_rightIsStrong"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createConstant_xc5f9o_d0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "is applicable:"); editorCell.setCellId("Constant_xc5f9o_d0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_xc5f9o_e0() { SingleRoleCellProvider provider = new OverloadedOperatorTypeRule_EditorBuilder_a.isApplicableSingleRoleHandler_xc5f9o_e0(myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x5529dae323134a31L, "isApplicable"), getEditorContext()); return provider.createCell(); } private static class isApplicableSingleRoleHandler_xc5f9o_e0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public isApplicableSingleRoleHandler_xc5f9o_e0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { super(containmentLink, context); myNode = ownerNode; } @Override @NotNull public SNode getNode() { return myNode; } protected EditorCell createChildCell(SNode child) { EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x5529dae323134a31L, "isApplicable"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x5529dae323134a31L, "isApplicable"), child)); installCellInfo(child, editorCell); return editorCell; } private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x5529dae323134a31L, "isApplicable"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("isApplicable"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x5529dae323134a31L, "isApplicable"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_isApplicable"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no isApplicable>"; } } private EditorCell createConstant_xc5f9o_f0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "operation type:"); editorCell.setCellId("Constant_xc5f9o_f0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_xc5f9o_g0() { SingleRoleCellProvider provider = new OverloadedOperatorTypeRule_EditorBuilder_a.functionSingleRoleHandler_xc5f9o_g0(myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449fL, "function"), getEditorContext()); return provider.createCell(); } private static class functionSingleRoleHandler_xc5f9o_g0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public functionSingleRoleHandler_xc5f9o_g0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { super(containmentLink, context); myNode = ownerNode; } @Override @NotNull public SNode getNode() { return myNode; } protected EditorCell createChildCell(SNode child) { EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449fL, "function"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449fL, "function"), child)); installCellInfo(child, editorCell); return editorCell; } private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449fL, "function"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("function"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x7a5dda6291404668L, 0xab76d5ed1746f2b2L, 0x70bfdafbb2c9449bL, 0x70bfdafbb2c9449fL, "function"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_function"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no function>"; } } private EditorCell createConstant_xc5f9o_h0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "-----------------------------------------------"); editorCell.setCellId("Constant_xc5f9o_h0"); Style style = new StyleImpl(); new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } }