package jetbrains.mps.lang.plugin.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.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.BraceStyleClass; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.AnnotationStyleClass; import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.mps.openapi.language.SContainmentLink; import jetbrains.mps.openapi.editor.cells.CellActionType; import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; /*package*/ class ToolTab_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public ToolTab_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_vspo6f_a(); } private EditorCell createCollection_vspo6f_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_vspo6f_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createConstant_vspo6f_a0()); editorCell.addEditorCell(createConstant_vspo6f_b0()); editorCell.addEditorCell(createConstant_vspo6f_c0()); editorCell.addEditorCell(createRefNode_vspo6f_d0()); editorCell.addEditorCell(createConstant_vspo6f_e0()); editorCell.addEditorCell(createRefNode_vspo6f_f0()); editorCell.addEditorCell(createConstant_vspo6f_g0()); editorCell.addEditorCell(createRefNode_vspo6f_h0()); editorCell.addEditorCell(createConstant_vspo6f_i0()); editorCell.addEditorCell(createRefNode_vspo6f_j0()); editorCell.addEditorCell(createConstant_vspo6f_k0()); return editorCell; } private EditorCell createConstant_vspo6f_a0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "tab"); editorCell.setCellId("Constant_vspo6f_a0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vspo6f_b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{"); editorCell.setCellId("Constant_vspo6f_b0"); Style style = new StyleImpl(); new BraceStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_vspo6f_c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "component:"); editorCell.setCellId("Constant_vspo6f_c0"); Style style = new StyleImpl(); new AnnotationStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_vspo6f_d0() { SingleRoleCellProvider provider = new ToolTab_EditorBuilder_a.componentExpressionSingleRoleHandler_vspo6f_d0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad10L, "componentExpression"), getEditorContext()); return provider.createCell(); } private static class componentExpressionSingleRoleHandler_vspo6f_d0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public componentExpressionSingleRoleHandler_vspo6f_d0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad10L, "componentExpression"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad10L, "componentExpression"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad10L, "componentExpression"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("componentExpression"); } Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad10L, "componentExpression"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_componentExpression"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no componentExpression>"; } } private EditorCell createConstant_vspo6f_e0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "title:"); editorCell.setCellId("Constant_vspo6f_e0"); Style style = new StyleImpl(); new AnnotationStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_vspo6f_f0() { SingleRoleCellProvider provider = new ToolTab_EditorBuilder_a.titleExpressionSingleRoleHandler_vspo6f_f0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad11L, "titleExpression"), getEditorContext()); return provider.createCell(); } private static class titleExpressionSingleRoleHandler_vspo6f_f0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public titleExpressionSingleRoleHandler_vspo6f_f0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad11L, "titleExpression"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad11L, "titleExpression"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad11L, "titleExpression"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("titleExpression"); } Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad11L, "titleExpression"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_titleExpression"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no title>"; } } private EditorCell createConstant_vspo6f_g0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "icon:"); editorCell.setCellId("Constant_vspo6f_g0"); Style style = new StyleImpl(); new AnnotationStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_vspo6f_h0() { SingleRoleCellProvider provider = new ToolTab_EditorBuilder_a.iconExpressionSingleRoleHandler_vspo6f_h0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad12L, "iconExpression"), getEditorContext()); return provider.createCell(); } private static class iconExpressionSingleRoleHandler_vspo6f_h0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public iconExpressionSingleRoleHandler_vspo6f_h0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad12L, "iconExpression"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad12L, "iconExpression"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad12L, "iconExpression"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("iconExpression"); } Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad12L, "iconExpression"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_iconExpression"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no icon>"; } } private EditorCell createConstant_vspo6f_i0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "dispose:"); editorCell.setCellId("Constant_vspo6f_i0"); Style style = new StyleImpl(); new AnnotationStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_vspo6f_j0() { SingleRoleCellProvider provider = new ToolTab_EditorBuilder_a.disposeTabClosureSingleRoleHandler_vspo6f_j0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad13L, "disposeTabClosure"), getEditorContext()); return provider.createCell(); } private static class disposeTabClosureSingleRoleHandler_vspo6f_j0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public disposeTabClosureSingleRoleHandler_vspo6f_j0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad13L, "disposeTabClosure"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad13L, "disposeTabClosure"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad13L, "disposeTabClosure"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("disposeTabClosure"); } Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x6048eaf0c78f324eL, 0x6048eaf0c78fad13L, "disposeTabClosure"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_disposeTabClosure"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no dispose block>"; } } private EditorCell createConstant_vspo6f_k0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}"); editorCell.setCellId("Constant_vspo6f_k0"); Style style = new StyleImpl(); new BraceStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_ON_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } }