package jetbrains.mps.lang.structure.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.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.lang.structure.editor.structure_StyleSheet.KeywordStyleClass; import jetbrains.mps.lang.editor.menus.transformation.NamedTransformationMenuLookup; import jetbrains.mps.smodel.language.LanguageRegistry; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.nodeEditor.cells.EditorCell_Property; import jetbrains.mps.nodeEditor.cells.ModelAccessor; import jetbrains.mps.nodeEditor.cells.TransactionalPropertyAccessor; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.smodel.structure.ExtensionPoint; import jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import jetbrains.mps.nodeEditor.cells.ChangePropertyEditorCommand; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.ConceptNameStyleClass; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.lang.editor.cellProviders.RefCellCellProvider; import jetbrains.mps.util.Computable; import jetbrains.mps.editor.runtime.impl.CellUtil; import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; import jetbrains.mps.smodel.action.NodeFactoryManager; 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.openapi.editor.cells.DefaultSubstituteInfo; import jetbrains.mps.nodeEditor.cells.EditorCell_Indent; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.StringLiteralStyleClass; import jetbrains.mps.nodeEditor.MPSFonts; import jetbrains.mps.openapi.editor.style.StyleRegistry; import jetbrains.mps.nodeEditor.MPSColors; import jetbrains.mps.smodel.action.SNodeFactoryOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_CreateChildRangeSelection; import jetbrains.mps.nodeEditor.selection.NodeRangeSelection; import jetbrains.mps.lang.core.behavior.BaseConcept__BehaviorDescriptor; import jetbrains.mps.util.EqualUtil; import jetbrains.mps.editor.runtime.cells.EmptyCellAction; import jetbrains.mps.nodeEditor.cells.EditorCell_ContextAssistantComponent; /*package*/ class ConceptDeclaration_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public ConceptDeclaration_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_ueqr71_a(); } private EditorCell createCollection_ueqr71_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_ueqr71_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createCollection_ueqr71_a0()); editorCell.addEditorCell(createConstant_ueqr71_b0()); editorCell.addEditorCell(createCollection_ueqr71_c0()); editorCell.addEditorCell(createConstant_ueqr71_d0()); editorCell.addEditorCell(createContextAssistant_ueqr71_e0()); return editorCell; } private EditorCell createCollection_ueqr71_a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_ueqr71_a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); if (nodeCondition_ueqr71_a0a0()) { editorCell.addEditorCell(createConstant_ueqr71_a0a()); } if (nodeCondition_ueqr71_a1a0()) { editorCell.addEditorCell(createConstant_ueqr71_b0a()); } editorCell.addEditorCell(createConstant_ueqr71_c0a()); editorCell.addEditorCell(createTransactionalProperty_ueqr71_d0a()); editorCell.addEditorCell(createCollection_ueqr71_e0a()); return editorCell; } private boolean nodeCondition_ueqr71_a0a0() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x403a32c5772c7ec2L, "abstract")) == true; } private boolean nodeCondition_ueqr71_a1a0() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x403a32c5772c7ec7L, "final")) == true; } private EditorCell createConstant_ueqr71_a0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "abstract"); editorCell.setCellId("Constant_ueqr71_a0a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.EDITABLE, false); editorCell.getStyle().putAll(style); _ConceptDeclaration_DeleteAbstract_Action.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_b0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "final"); editorCell.setCellId("Constant_ueqr71_b0a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); _ConceptDeclaration_DeleteFinal_Action.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_c0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "concept"); editorCell.setCellId("Constant_ueqr71_c0a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.EDITABLE, _StyleParameter_QueryFunction_ueqr71_a0c0a()); editorCell.getStyle().putAll(style); editorCell.setTransformationMenuLookup(new NamedTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, "jetbrains.mps.lang.structure.structure.ConceptDeclaration"), "jetbrains.mps.lang.structure.editor.ConceptDeclaration_ext_1_RTransform_Menu")); editorCell.setDefaultText(""); editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell)); return editorCell; } private boolean _StyleParameter_QueryFunction_ueqr71_a0c0a() { return !(SPropertyOperations.getBoolean(getNode(), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x403a32c5772c7ec2L, "abstract"))) && !(SPropertyOperations.getBoolean(getNode(), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0x403a32c5772c7ec7L, "final"))); } private EditorCell createTransactionalProperty_ueqr71_d0a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("name"); EditorCell_Property editorCell = null; { ModelAccessor modelAccessor = new TransactionalPropertyAccessor(myNode, "name", false, false, getEditorContext()) { public void doCommit(final String oldValue, final String newValue) { doCommitImpl(oldValue, newValue); } public void doCommitImpl(final String oldValue, final String newValue) { if (!(Sequence.fromIterable(new ExtensionPoint<_FunctionTypes._return_P4_E0<? extends Boolean, ? super EditorContext, ? super SNode, ? super String, ? super String>>("jetbrains.mps.lang.structure.NodeRenamer").getObjects()).any(new IWhereFilter<_FunctionTypes._return_P4_E0<? extends Boolean, ? super EditorContext, ? super SNode, ? super String, ? super String>>() { public boolean accept(_FunctionTypes._return_P4_E0<? extends Boolean, ? super EditorContext, ? super SNode, ? super String, ? super String> it) { return it.invoke(getEditorContext(), myNode, oldValue, newValue); } }))) { getEditorContext().getRepository().getModelAccess().executeCommand(new ChangePropertyEditorCommand(getEditorContext(), "name_" + myNode.getNodeId().toString()) { protected void doExecute() { SPropertyOperations.set(myNode, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), newValue); } }); } } }; editorCell = EditorCell_Property.create(getEditorContext(), modelAccessor, myNode); editorCell.setCellId("name"); Style style = new StyleImpl(); new ConceptNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText("<no name>"); editorCell.setCommitInCommand(false); } 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_ueqr71_e0a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_ueqr71_e0a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setGridLayout(true); editorCell.addEditorCell(createCollection_ueqr71_a4a0()); editorCell.addEditorCell(createCollection_ueqr71_b4a0()); return editorCell; } private EditorCell createCollection_ueqr71_a4a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_ueqr71_a4a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_ueqr71_a0e0a()); editorCell.addEditorCell(createRefCell_ueqr71_b0e0a()); return editorCell; } private EditorCell createConstant_ueqr71_a0e0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "extends"); editorCell.setCellId("Constant_ueqr71_a0e0a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefCell_ueqr71_b0e0a() { CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) { @Override protected EditorCell createRefCell(EditorContext context, final SNode effectiveNode, SNode node) { EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable<EditorCell>() { public EditorCell compute() { return new ConceptDeclaration_EditorBuilder_a.Inline_Builder_ueqr71_a1a4a0(getEditorContext(), myNode, effectiveNode).createCell(); } }, effectiveNode, "extends"); CellUtil.setupIDeprecatableStyles(effectiveNode, cell); setSemanticNodeToCells(cell, myNode); installDeleteActions_nullable_reference(cell); return cell; } }; provider.setRole("extends"); provider.setNoTargetText("<default>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("extends"); } 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; } /*package*/ static class Inline_Builder_ueqr71_a1a4a0 extends AbstractEditorBuilder { @NotNull private SNode myNode; private SNode myReferencingNode; /*package*/ Inline_Builder_ueqr71_a1a4a0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { super(context); myReferencingNode = referencingNode; myNode = node; } /*package*/ EditorCell createCell() { return createProperty_ueqr71_a0b0e0a(); } @NotNull @Override public SNode getNode() { return myNode; } private EditorCell createProperty_ueqr71_a0b0e0a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("name"); provider.setNoTargetText("<no name>"); provider.setReadOnly(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_name"); Style style = new StyleImpl(); new ConceptNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.AUTO_DELETABLE, true); editorCell.getStyle().putAll(style); 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_ueqr71_b4a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_ueqr71_b4a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_ueqr71_a1e0a()); editorCell.addEditorCell(createRefNodeList_ueqr71_b1e0a()); return editorCell; } private EditorCell createConstant_ueqr71_a1e0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "implements"); editorCell.setCellId("Constant_ueqr71_a1e0a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNodeList_ueqr71_b1e0a() { AbstractCellListHandler handler = new ConceptDeclaration_EditorBuilder_a.implementsListHandler_ueqr71_b1e0a(myNode, "implements", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); editorCell.setCellId("refNodeList_implements"); Style style = new StyleImpl(); new ConceptNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class implementsListHandler_ueqr71_b1e0a extends RefNodeListHandler { @NotNull private SNode myNode; public implementsListHandler_ueqr71_b1e0a(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(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x110356fc618L, "jetbrains.mps.lang.structure.structure.InterfaceConceptReference"), 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(implementsListHandler_ueqr71_b1e0a.this.getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, 0x110358d693eL, "implements"))); try { EditorCell emptyCell = null; emptyCell = createConstant_ueqr71_a1b4a0(); 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)); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, 0x110358d693eL, "implements"), elementNode)); } } } private EditorCell createConstant_ueqr71_a1b4a0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_a1b4a0"); Style style = new StyleImpl(); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText("<none>"); return editorCell; } } private EditorCell createConstant_ueqr71_b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createCollection_ueqr71_c0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_ueqr71_c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createIndentCell_ueqr71_a2a()); editorCell.addEditorCell(createCollection_ueqr71_b2a()); return editorCell; } private EditorCell createIndentCell_ueqr71_a2a() { EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode); return editorCell; } private EditorCell createCollection_ueqr71_b2a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_ueqr71_b2a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_ueqr71_a1c0()); editorCell.addEditorCell(createProperty_ueqr71_b1c0()); if (nodeCondition_ueqr71_a2b2a()) { editorCell.addEditorCell(createCollection_ueqr71_c1c0()); } editorCell.addEditorCell(createConstant_ueqr71_d1c0()); editorCell.addEditorCell(createProperty_ueqr71_e1c0()); editorCell.addEditorCell(createConstant_ueqr71_f1c0()); editorCell.addEditorCell(createProperty_ueqr71_g1c0()); editorCell.addEditorCell(createConstant_ueqr71_h1c0()); editorCell.addEditorCell(createConstant_ueqr71_i1c0()); editorCell.addEditorCell(createRefNodeList_ueqr71_j1c0()); editorCell.addEditorCell(createConstant_ueqr71_k1c0()); editorCell.addEditorCell(createConstant_ueqr71_l1c0()); editorCell.addEditorCell(createRefNodeList_ueqr71_m1c0()); editorCell.addEditorCell(createConstant_ueqr71_n1c0()); editorCell.addEditorCell(createConstant_ueqr71_o1c0()); editorCell.addEditorCell(createRefNodeList_ueqr71_p1c0()); if (nodeCondition_ueqr71_a61b2a()) { editorCell.addEditorCell(createCollection_ueqr71_q1c0()); } return editorCell; } private boolean nodeCondition_ueqr71_a2b2a() { // todo: temporary disabled, see MPS-18470 return false; } private boolean nodeCondition_ueqr71_a61b2a() { return IdEditorHelper.shownInEditor(myNode); } private EditorCell createConstant_ueqr71_a1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "instance can be root:"); editorCell.setCellId("Constant_ueqr71_a1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_b1c0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("rootable"); provider.setNoTargetText("<no rootable>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_rootable"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_c1c0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_ueqr71_c1c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_ueqr71_a2b2a()); editorCell.addEditorCell(createProperty_ueqr71_b2b2a()); return editorCell; } private EditorCell createConstant_ueqr71_a2b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "scope:"); editorCell.setCellId("Constant_ueqr71_a2b2a"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_b2b2a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("staticScope"); provider.setNoTargetText("<no staticScope>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_staticScope"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_d1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "alias:"); editorCell.setCellId("Constant_ueqr71_d1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_e1c0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("conceptAlias"); provider.setNoTargetText("<no alias>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_conceptAlias"); Style style = new StyleImpl(); new StringLiteralStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_f1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "short description:"); editorCell.setCellId("Constant_ueqr71_f1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_g1c0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("conceptShortDescription"); provider.setNoTargetText("<no short description>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_conceptShortDescription"); Style style = new StyleImpl(); new StringLiteralStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_h1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_h1c0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_i1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "properties:"); editorCell.setCellId("Constant_ueqr71_i1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNodeList_ueqr71_j1c0() { AbstractCellListHandler handler = new ConceptDeclaration_EditorBuilder_a.propertyDeclarationListHandler_ueqr71_j1c0(myNode, "propertyDeclaration", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); editorCell.setCellId("refNodeList_propertyDeclaration"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setGridLayout(true); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class propertyDeclarationListHandler_ueqr71_j1c0 extends RefNodeListHandler { @NotNull private SNode myNode; public propertyDeclarationListHandler_ueqr71_j1c0(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(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086bL, "jetbrains.mps.lang.structure.structure.PropertyDeclaration"), 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(propertyDeclarationListHandler_ueqr71_j1c0.this.getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6cL, "propertyDeclaration"))); try { EditorCell emptyCell = null; emptyCell = createConstant_ueqr71_a9b2a(); 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)); PropertyDeclarationDeleteActions.setCellActions(elementCell, elementNode, getEditorContext()); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6cL, "propertyDeclaration"), elementNode)); } } } private EditorCell createConstant_ueqr71_a9b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("emptyPropertiesPlaceHolder"); Style style = new StyleImpl(); style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray)); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); editorCell.setTransformationMenuLookup(new NamedTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, "jetbrains.mps.lang.structure.structure.ConceptDeclaration"), "jetbrains.mps.lang.structure.editor.ConceptDeclaration_ApplySideTransforms_2")); editorCell.setDefaultText("<< ... >>"); editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell)); return editorCell; } } private EditorCell createConstant_ueqr71_k1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_k1c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_l1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "children:"); editorCell.setCellId("Constant_ueqr71_l1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNodeList_ueqr71_m1c0() { AbstractCellListHandler handler = new ConceptDeclaration_EditorBuilder_a.linkDeclarationListHandler_ueqr71_m1c0(myNode, "linkDeclaration", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); editorCell.setCellId("refNodeList_linkDeclaration"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setGridLayout(true); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class linkDeclarationListHandler_ueqr71_m1c0 extends RefNodeListHandler { @NotNull private SNode myNode; public linkDeclarationListHandler_ueqr71_m1c0(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 nodeFactory(); } public SNode nodeFactory() { SNode result = SNodeFactoryOperations.createNewNode(SNodeOperations.getModel(myNode), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), null); SPropertyOperations.set(result, MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "aggregation"); return result; } public EditorCell createNodeCell(SNode elementNode) { EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); installElementCellActions(elementNode, elementCell); elementCell.setAction(CellActionType.SELECT_NEXT, new CellAction_CreateChildRangeSelection(elementNode, new ConceptDeclaration_EditorBuilder_a.RangeSelectionFilter_ueqr71_m1c0(), "emptyChildrenPlaceHolder", getEditorContext(), true)); elementCell.setAction(CellActionType.SELECT_PREVIOUS, new CellAction_CreateChildRangeSelection(elementNode, new ConceptDeclaration_EditorBuilder_a.RangeSelectionFilter_ueqr71_m1c0(), "emptyChildrenPlaceHolder", getEditorContext(), false)); return elementCell; } public EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(linkDeclarationListHandler_ueqr71_m1c0.this.getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6bL, "linkDeclaration"))); try { EditorCell emptyCell = null; emptyCell = createConstant_ueqr71_a21b2a(); 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)); LinkDeclarationDeleteActions.setCellActions(elementCell, elementNode, getEditorContext()); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6bL, "linkDeclaration"), elementNode)); } } } public boolean filter(SNode childNode) { return SPropertyOperations.hasValue(SNodeOperations.cast(childNode, MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "aggregation", "reference"); } private EditorCell createConstant_ueqr71_a21b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("emptyChildrenPlaceHolder"); Style style = new StyleImpl(); style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray)); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); editorCell.setTransformationMenuLookup(new NamedTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, "jetbrains.mps.lang.structure.structure.ConceptDeclaration"), "jetbrains.mps.lang.structure.editor.ConceptDeclaration_ApplySideTransforms")); editorCell.setDefaultText("<< ... >>"); editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell)); return editorCell; } } public static class RangeSelectionFilter_ueqr71_m1c0 extends NodeRangeSelection.RangeSelectionFilter { public boolean accept(SNode childNode) { return SPropertyOperations.hasValue(SNodeOperations.cast(childNode, MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "aggregation", "reference"); } public String getModuleReference() { return "c72da2b9-7cce-4447-8389-f407dc1158b7(jetbrains.mps.lang.structure)"; } } private EditorCell createConstant_ueqr71_n1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_n1c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_o1c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "references:"); editorCell.setCellId("Constant_ueqr71_o1c0"); Style style = new StyleImpl(); new KeywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNodeList_ueqr71_p1c0() { AbstractCellListHandler handler = new ConceptDeclaration_EditorBuilder_a.linkDeclarationListHandler_ueqr71_p1c0(myNode, "linkDeclaration", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); editorCell.setCellId("refNodeList_linkDeclaration_1"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setGridLayout(true); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class linkDeclarationListHandler_ueqr71_p1c0 extends RefNodeListHandler { @NotNull private SNode myNode; public linkDeclarationListHandler_ueqr71_p1c0(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 nodeFactory(); } public SNode nodeFactory() { SNode result = SNodeFactoryOperations.createNewNode(SNodeOperations.getModel(myNode), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), null); SPropertyOperations.set(result, MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "reference"); return result; } public EditorCell createNodeCell(SNode elementNode) { EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); installElementCellActions(elementNode, elementCell); elementCell.setAction(CellActionType.SELECT_NEXT, new CellAction_CreateChildRangeSelection(elementNode, new ConceptDeclaration_EditorBuilder_a.RangeSelectionFilter_ueqr71_p1c0(), "emptyRefPlaceHolder", getEditorContext(), true)); elementCell.setAction(CellActionType.SELECT_PREVIOUS, new CellAction_CreateChildRangeSelection(elementNode, new ConceptDeclaration_EditorBuilder_a.RangeSelectionFilter_ueqr71_p1c0(), "emptyRefPlaceHolder", getEditorContext(), false)); return elementCell; } public EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(linkDeclarationListHandler_ueqr71_p1c0.this.getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6bL, "linkDeclaration"))); try { EditorCell emptyCell = null; emptyCell = createConstant_ueqr71_a51b2a(); 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)); LinkDeclarationDeleteActions.setCellActions(elementCell, elementNode, getEditorContext()); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x1103553c5ffL, 0xf979c3ba6bL, "linkDeclaration"), elementNode)); } } } public boolean filter(SNode childNode) { return SPropertyOperations.hasValue(SNodeOperations.cast(childNode, MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "reference", "reference"); } private EditorCell createConstant_ueqr71_a51b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("emptyRefPlaceHolder"); Style style = new StyleImpl(); style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray)); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); editorCell.setTransformationMenuLookup(new NamedTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, "jetbrains.mps.lang.structure.structure.ConceptDeclaration"), "jetbrains.mps.lang.structure.editor.ConceptDeclaration_ApplySideTransforms_1")); editorCell.setDefaultText("<< ... >>"); editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell)); return editorCell; } } public static class RangeSelectionFilter_ueqr71_p1c0 extends NodeRangeSelection.RangeSelectionFilter { public boolean accept(SNode childNode) { return SPropertyOperations.hasValue(SNodeOperations.cast(childNode, MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, "jetbrains.mps.lang.structure.structure.LinkDeclaration")), MetaAdapterFactory.getProperty(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979bd086aL, 0xf980556927L, "metaClass"), "reference", "reference"); } public String getModuleReference() { return "c72da2b9-7cce-4447-8389-f407dc1158b7(jetbrains.mps.lang.structure)"; } } private EditorCell createCollection_ueqr71_q1c0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_ueqr71_q1c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_ueqr71_a61b2a()); editorCell.addEditorCell(createConstant_ueqr71_b61b2a()); editorCell.addEditorCell(createProperty_ueqr71_c61b2a()); editorCell.addEditorCell(createConstant_ueqr71_d61b2a()); editorCell.addEditorCell(createProperty_ueqr71_e61b2a()); editorCell.addEditorCell(createConstant_ueqr71_f61b2a()); editorCell.addEditorCell(createRefCell_ueqr71_g61b2a()); return editorCell; } private EditorCell createConstant_ueqr71_a61b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " "); editorCell.setCellId("Constant_ueqr71_a61b2a"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_ueqr71_b61b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "concept ID:"); editorCell.setCellId("Constant_ueqr71_b61b2a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_c61b2a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("conceptId"); provider.setNoTargetText("<no conceptId>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_conceptId"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_d61b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "language UUID:"); editorCell.setCellId("Constant_ueqr71_d61b2a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_ueqr71_e61b2a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("languageId"); provider.setNoTargetText("<no languageId>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_languageId"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); 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_ueqr71_f61b2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "source node:"); editorCell.setCellId("Constant_ueqr71_f61b2a"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefCell_ueqr71_g61b2a() { CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) { @Override protected EditorCell createRefCell(EditorContext context, final SNode effectiveNode, SNode node) { EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable<EditorCell>() { public EditorCell compute() { return new ConceptDeclaration_EditorBuilder_a.Inline_Builder_ueqr71_a6q1c0(getEditorContext(), myNode, effectiveNode).createCell(); } }, effectiveNode, "sourceNode"); CellUtil.setupIDeprecatableStyles(effectiveNode, cell); setSemanticNodeToCells(cell, myNode); installDeleteActions_nullable_reference(cell); return cell; } }; provider.setRole("sourceNode"); provider.setNoTargetText("<no sourceNode>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("sourceNode"); } 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; } /*package*/ static class Inline_Builder_ueqr71_a6q1c0 extends AbstractEditorBuilder { @NotNull private SNode myNode; private SNode myReferencingNode; /*package*/ Inline_Builder_ueqr71_a6q1c0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { super(context); myReferencingNode = referencingNode; myNode = node; } /*package*/ EditorCell createCell() { return createReadOnlyModelAccessor_ueqr71_a0g61b2a(); } @NotNull @Override public SNode getNode() { return myNode; } private EditorCell createReadOnlyModelAccessor_ueqr71_a0g61b2a() { EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new ModelAccessor() { public String getText() { return (myNode == null ? "current node" : BaseConcept__BehaviorDescriptor.getPresentation_idhEwIMiw.invoke(myNode)); } public void setText(String s) { } public boolean isValidText(String s) { return EqualUtil.equals(s, getText()); } }, myNode); editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance()); editorCell.setAction(CellActionType.BACKSPACE, EmptyCellAction.getInstance()); editorCell.setCellId("ReadOnlyModelAccessor_ueqr71_a0g61b2a"); Style style = new StyleImpl(); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); return editorCell; } } private EditorCell createConstant_ueqr71_d0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_ueqr71_d0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createContextAssistant_ueqr71_e0() { EditorCell editorCell = new EditorCell_ContextAssistantComponent(getEditorContext(), myNode); editorCell.setCellId("ContextAssistant_ueqr71_e0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); return editorCell; } }