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.AbstractCellProvider; import jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes; import jetbrains.mps.nodeEditor.cells.EditorCell_Error; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.editor.runtime.style.Padding; import jetbrains.mps.editor.runtime.cells.BigCellUtil; /*package*/ class BuildLayout_CopyHandler_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public BuildLayout_CopyHandler_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCustom_r67zyn_a(); } private EditorCell createCustom_r67zyn_a() { AbstractCellProvider provider = new _FunctionTypes._return_P0_E0<AbstractCellProvider>() { public AbstractCellProvider invoke() { return new AbstractCellProvider(myNode) { @Override public EditorCell createEditorCell(EditorContext context) { EditorCell_Error result = new EditorCell_Error(context, myNode, "<no handler>"); result.getStyle().set(StyleAttributes.PADDING_LEFT, new Padding(0.0)); result.getStyle().set(StyleAttributes.PADDING_RIGHT, new Padding(0.0)); return result; } }; } }.invoke(); EditorCell editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("Custom_r67zyn_a"); EditorCell bigCell = BigCellUtil.findBigCell(editorCell, getNode()); if (bigCell != null) { bigCell.setBig(true); bigCell.setCellContext(getCellFactory().getCellContext()); } return editorCell; } }