package jetbrains.mps.baseLanguage.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.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.baseLanguage.behavior.IBLDeprecatable__BehaviorDescriptor; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.CommentStyleClass; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.JavaDocStyleClass; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.FoldedCellStyleClass; /*package*/ class _DeprecatedPart_ComponentBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public _DeprecatedPart_ComponentBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_uc5iyq_a(); } private EditorCell createCollection_uc5iyq_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_uc5iyq_a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); if (nodeCondition_uc5iyq_a0a()) { editorCell.addEditorCell(createCollection_uc5iyq_a0()); } return editorCell; } private boolean nodeCondition_uc5iyq_a0a() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11d2ea8a339L, 0x11d2ea948a4L, "isDeprecated")) && (boolean) IBLDeprecatable__BehaviorDescriptor.shouldDeprecatedDocBeVisible_id7gdCoemJ2WL.invoke(myNode); } private EditorCell createCollection_uc5iyq_a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_uc5iyq_a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setFoldable(true); editorCell.setFoldedCell(createConstant_uc5iyq_a0a_0()); editorCell.addEditorCell(createConstant_uc5iyq_a0a()); editorCell.addEditorCell(createConstant_uc5iyq_b0a()); editorCell.addEditorCell(createConstant_uc5iyq_c0a()); editorCell.addEditorCell(createConstant_uc5iyq_d0a()); editorCell.addEditorCell(createConstant_uc5iyq_e0a()); editorCell.addEditorCell(createConstant_uc5iyq_f0a()); editorCell.addEditorCell(createConstant_uc5iyq_g0a()); editorCell.addEditorCell(createConstant_uc5iyq_h0a()); return editorCell; } private EditorCell createConstant_uc5iyq_a0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "/**"); editorCell.setCellId("Constant_uc5iyq_a0a"); Style style = new StyleImpl(); new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_ON_NEW_LINE, true); style.set(StyleAttributes.PUNCTUATION_RIGHT, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_b0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " "); editorCell.setCellId("Constant_uc5iyq_b0a"); Style style = new StyleImpl(); style.set(StyleAttributes.PUNCTUATION_RIGHT, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_c0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_uc5iyq_c0a"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_d0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " * "); editorCell.setCellId("Constant_uc5iyq_d0a"); Style style = new StyleImpl(); new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_e0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "@deprecated"); editorCell.setCellId("Constant_uc5iyq_e0a"); Style style = new StyleImpl(); new JavaDocStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.PUNCTUATION_RIGHT, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_f0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " "); editorCell.setCellId("Constant_uc5iyq_f0a"); Style style = new StyleImpl(); style.set(StyleAttributes.PUNCTUATION_RIGHT, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_g0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_uc5iyq_g0a"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_h0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " */"); editorCell.setCellId("Constant_uc5iyq_h0a"); Style style = new StyleImpl(); new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_uc5iyq_a0a_0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "/**...*/"); editorCell.setCellId("Constant_uc5iyq_a0a_0"); Style style = new StyleImpl(); new FoldedCellStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); DeleteOrTransformDeprecationDoc.setCellActions(editorCell, myNode, getEditorContext()); editorCell.setDefaultText(""); return editorCell; } }