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.editor.runtime.cells.BigCellUtil; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.nodeEditor.MPSFonts; import jetbrains.mps.smodel.runtime.ConceptPresentation; import jetbrains.mps.kernel.language.ConceptAspectsHelper; /*package*/ class ConceptFunctionParameter_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public ConceptFunctionParameter_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createComponent_q0ga01_a(); } private EditorCell createComponent_q0ga01_a() { EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); EditorCell bigCell = BigCellUtil.findBigCell(editorCell, getNode()); if (bigCell != null) { bigCell.setBig(true); bigCell.setCellContext(getCellFactory().getCellContext()); } Style style = new StyleImpl(); new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC); style.set(StyleAttributes.STRIKE_OUT, _StyleParameter_QueryFunction_q0ga01_a1a()); style.set(StyleAttributes.AUTO_DELETABLE, true); editorCell.getStyle().putAll(style); return editorCell; } private boolean _StyleParameter_QueryFunction_q0ga01_a1a() { ConceptPresentation pres = ConceptAspectsHelper.getPresentationAspect(getNode()); return (pres == null ? false : pres.isDeprecated()); } }