package jetbrains.mps.build.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_Indent; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.build.editor.buildStyles_StyleSheet.keywordStyleClass; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.build.util.RelativePathHelper; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical; import jetbrains.mps.nodeEditor.cells.EditorCell_Property; import jetbrains.mps.nodeEditor.cells.ModelAccessor; import jetbrains.mps.build.behavior.BuildProject__BehaviorDescriptor; import jetbrains.mps.build.util.Context; import jetbrains.mps.util.EqualUtil; import jetbrains.mps.openapi.editor.cells.CellActionType; import jetbrains.mps.editor.runtime.cells.EmptyCellAction; import jetbrains.mps.openapi.editor.style.StyleRegistry; import jetbrains.mps.nodeEditor.MPSColors; import jetbrains.mps.nodeEditor.cells.EditorCell_Component; import javax.swing.JComponent; import jetbrains.mps.editor.runtime.EditorUtil; import jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes; 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.nodeEditor.cellActions.CellAction_DeleteNode; import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; import org.jetbrains.mps.openapi.language.SContainmentLink; import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; /*package*/ class BuildProject_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public BuildProject_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_vny568_a(); } private EditorCell createCollection_vny568_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_vny568_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createConstant_vny568_a0()); editorCell.addEditorCell(createProperty_vny568_b0()); editorCell.addEditorCell(createConstant_vny568_c0()); editorCell.addEditorCell(createProperty_vny568_d0()); editorCell.addEditorCell(createConstant_vny568_e0()); editorCell.addEditorCell(createConstant_vny568_f0()); editorCell.addEditorCell(createCollection_vny568_g0()); editorCell.addEditorCell(createConstant_vny568_h0()); editorCell.addEditorCell(createConstant_vny568_i0()); editorCell.addEditorCell(createRefNodeList_vny568_j0()); editorCell.addEditorCell(createConstant_vny568_k0()); editorCell.addEditorCell(createConstant_vny568_l0()); editorCell.addEditorCell(createRefNodeList_vny568_m0()); editorCell.addEditorCell(createConstant_vny568_n0()); editorCell.addEditorCell(createConstant_vny568_o0()); editorCell.addEditorCell(createRefNodeList_vny568_p0()); editorCell.addEditorCell(createConstant_vny568_q0()); editorCell.addEditorCell(createConstant_vny568_r0()); editorCell.addEditorCell(createRefNodeList_vny568_s0()); if (nodeCondition_vny568_a91a()) { editorCell.addEditorCell(createConstant_vny568_t0()); } editorCell.addEditorCell(createConstant_vny568_u0()); editorCell.addEditorCell(createRefNode_vny568_v0()); editorCell.addEditorCell(createRefNodeList_vny568_w0()); return editorCell; } private boolean nodeCondition_vny568_a91a() { return ListSequence.fromList(SLinkOperations.getChildren(myNode, MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x668c6cfbafacf6f2L, "parts"))).isEmpty() || SNodeOperations.getConcept(ListSequence.fromList(SLinkOperations.getChildren(myNode, MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x668c6cfbafacf6f2L, "parts"))).last()).isAbstract(); } private EditorCell createConstant_vny568_a0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "build"); editorCell.setCellId("Constant_vny568_a0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_vny568_b0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("name"); provider.setNoTargetText("<no name>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_name"); 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_vny568_c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "generates"); editorCell.setCellId("Constant_vny568_c0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_vny568_d0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("fileName"); provider.setNoTargetText("build.xml"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_fileName"); 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_vny568_e0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_e0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_f0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "base directory:"); editorCell.setCellId("Constant_vny568_f0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createCollection_vny568_g0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_vny568_g0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_vny568_a6a()); if (nodeCondition_vny568_a1g0()) { editorCell.addEditorCell(createCollection_vny568_b6a()); } return editorCell; } private boolean nodeCondition_vny568_a1g0() { final RelativePathHelper rph = RelativePathHelper.forModule(SNodeOperations.getModel(myNode).getModule()); return rph != null; } private EditorCell createCollection_vny568_a6a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_vny568_a6a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createProperty_vny568_a0g0()); editorCell.addEditorCell(createReadOnlyModelAccessor_vny568_b0g0()); return editorCell; } private EditorCell createProperty_vny568_a0g0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("internalBaseDirectory"); provider.setNoTargetText("<default>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_internalBaseDirectory"); 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 createReadOnlyModelAccessor_vny568_b0g0() { EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new ModelAccessor() { public String getText() { String basePath = BuildProject__BehaviorDescriptor.getBasePath_id4jjtc7WZOyG.invoke(myNode, Context.defaultContext()); return (basePath == null ? "<not available>" : basePath); } 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_vny568_b0g0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray)); style.set(StyleAttributes.EDITABLE, false); editorCell.getStyle().putAll(style); return editorCell; } private EditorCell createCollection_vny568_b6a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_vny568_b6a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createJComponent_vny568_a1g0()); return editorCell; } private EditorCell createJComponent_vny568_a1g0() { EditorCell editorCell = EditorCell_Component.createComponentCell(getEditorContext(), myNode, _QueryFunction_JComponent_vny568_a0b6a(), "_vny568_a1g0"); editorCell.setCellId("JComponent_vny568_a1g0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); return editorCell; } private JComponent _QueryFunction_JComponent_vny568_a0b6a() { final RelativePathHelper rph = RelativePathHelper.forModule(SNodeOperations.getModel(myNode).getModule()); if (rph == null) { // never happens, see show if condition on outer cell return null; } return EditorUtil.createSelectButton(myNode, MetaAdapterFactory.getProperty(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x48387ebae1a07a23L, "internalBaseDirectory"), getEditorContext(), false, new _FunctionTypes._return_P1_E0<String, String>() { public String invoke(String path) { try { return rph.makeRelative(path); } catch (Exception ex) { return path; } } }, new _FunctionTypes._return_P1_E0<String, String>() { public String invoke(String path) { try { return rph.makeAbsolute(path); } catch (Exception ex) { return path; } } }); } private EditorCell createConstant_vny568_h0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_h0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_i0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "use plugins:"); editorCell.setCellId("Constant_vny568_i0"); 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_vny568_j0() { AbstractCellListHandler handler = new BuildProject_EditorBuilder_a.pluginsListHandler_vny568_j0(myNode, "plugins", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_plugins"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class pluginsListHandler_vny568_j0 extends RefNodeListHandler { @NotNull private SNode myNode; public pluginsListHandler_vny568_j0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x5c3f3e2c1ce9819eL, "jetbrains.mps.build.structure.BuildPlugin"), 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(pluginsListHandler_vny568_j0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x5c3f3e2c1ce9ac70L, "plugins"))); 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)); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x5c3f3e2c1ce9ac70L, "plugins"), elementNode)); } } } } private EditorCell createConstant_vny568_k0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_k0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_l0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "macros:"); editorCell.setCellId("Constant_vny568_l0"); 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_vny568_m0() { AbstractCellListHandler handler = new BuildProject_EditorBuilder_a.macrosListHandler_vny568_m0(myNode, "macros", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_macros"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class macrosListHandler_vny568_m0 extends RefNodeListHandler { @NotNull private SNode myNode; public macrosListHandler_vny568_m0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a1fL, "jetbrains.mps.build.structure.BuildMacro"), 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(macrosListHandler_vny568_m0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a22L, "macros"))); 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)); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a22L, "macros"), elementNode)); } } } } private EditorCell createConstant_vny568_n0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_n0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_o0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "dependencies:"); editorCell.setCellId("Constant_vny568_o0"); 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_vny568_p0() { AbstractCellListHandler handler = new BuildProject_EditorBuilder_a.dependenciesListHandler_vny568_p0(myNode, "dependencies", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_dependencies"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class dependenciesListHandler_vny568_p0 extends RefNodeListHandler { @NotNull private SNode myNode; public dependenciesListHandler_vny568_p0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a23L, "jetbrains.mps.build.structure.BuildDependency"), 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(dependenciesListHandler_vny568_p0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a25L, "dependencies"))); 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)); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a25L, "dependencies"), elementNode)); } } } } private EditorCell createConstant_vny568_q0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_q0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_r0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "project structure:"); editorCell.setCellId("Constant_vny568_r0"); 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_vny568_s0() { AbstractCellListHandler handler = new BuildProject_EditorBuilder_a.partsListHandler_vny568_s0(myNode, "parts", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_parts"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class partsListHandler_vny568_s0 extends RefNodeListHandler { @NotNull private SNode myNode; public partsListHandler_vny568_s0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x668c6cfbafacdc08L, "jetbrains.mps.build.structure.BuildProjectPart"), 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(partsListHandler_vny568_s0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x668c6cfbafacf6f2L, "parts"))); 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)); } if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x668c6cfbafacf6f2L, "parts"), elementNode)); } } } } private EditorCell createConstant_vny568_t0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_t0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vny568_u0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "default layout:"); editorCell.setCellId("Constant_vny568_u0"); 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 createRefNode_vny568_v0() { SingleRoleCellProvider provider = new BuildProject_EditorBuilder_a.layoutSingleRoleHandler_vny568_v0(myNode, MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a1cL, "layout"), getEditorContext()); return provider.createCell(); } private static class layoutSingleRoleHandler_vny568_v0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public layoutSingleRoleHandler_vny568_v0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a1cL, "layout"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a1cL, "layout"), 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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a1cL, "layout"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("layout"); } Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x4df58c6f18f84a1cL, "layout"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_layout"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no layout>"; } } private EditorCell createRefNodeList_vny568_w0() { AbstractCellListHandler handler = new BuildProject_EditorBuilder_a.aspectsListHandler_vny568_w0(myNode, "aspects", getEditorContext()); EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); editorCell.setCellId("refNodeList_aspects"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setRole(handler.getElementRole()); return editorCell; } private static class aspectsListHandler_vny568_w0 extends RefNodeListHandler { @NotNull private SNode myNode; public aspectsListHandler_vny568_w0(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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x31292e1a60dd541dL, "jetbrains.mps.build.structure.BuildAspect"), 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(aspectsListHandler_vny568_w0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x31292e1a60db57afL, "aspects"))); try { EditorCell emptyCell = null; emptyCell = createConstant_vny568_a22a(); 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(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, 0x31292e1a60db57afL, "aspects"), elementNode)); } } } private EditorCell createConstant_vny568_a22a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_vny568_a22a"); Style style = new StyleImpl(); style.set(StyleAttributes.EDITABLE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText("<<additional aspects>>"); return editorCell; } } }