package jetbrains.mps.lang.editor.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_Horizontal;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.lang.editor.editor.Styles_StyleSheet.rootCellModelStyleStyleClass;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.lang.editor.editor.Styles_StyleSheet.borderedStyleClass;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import jetbrains.mps.openapi.editor.style.StyleRegistry;
import java.awt.Color;
import jetbrains.mps.lang.editor.behavior.EditorCellModel__BehaviorDescriptor;
/*package*/ class CellModel_ReadOnlyModelAccessor_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public CellModel_ReadOnlyModelAccessor_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_fs6ae3_a();
}
private EditorCell createCollection_fs6ae3_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_fs6ae3_a");
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
Style style = new StyleImpl();
new rootCellModelStyleStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createComponent_fs6ae3_a0());
editorCell.addEditorCell(createConstant_fs6ae3_b0());
editorCell.addEditorCell(createComponent_fs6ae3_c0());
return editorCell;
}
private EditorCell createComponent_fs6ae3_a0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.editor.editor._OpenTag");
return editorCell;
}
private EditorCell createConstant_fs6ae3_b0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "R/O model access");
editorCell.setCellId("Constant_fs6ae3_b0");
Style style = new StyleImpl();
new borderedStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_fs6ae3_a0b0()));
style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_fs6ae3_a1b0()));
style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_fs6ae3_a2b0()));
style.set(StyleAttributes.FONT_STYLE, _StyleParameter_QueryFunction_fs6ae3_a3b0());
style.set(StyleAttributes.UNDERLINED, _StyleParameter_QueryFunction_fs6ae3_a4b0());
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private Color _StyleParameter_QueryFunction_fs6ae3_a0b0() {
return (Color) EditorCellModel__BehaviorDescriptor.getTextBackgroundColor_idhL7BhMP.invoke(getNode());
}
private Color _StyleParameter_QueryFunction_fs6ae3_a1b0() {
return (Color) EditorCellModel__BehaviorDescriptor.getBackgroundColor_idhL7rNfN.invoke(getNode());
}
private Color _StyleParameter_QueryFunction_fs6ae3_a2b0() {
return (Color) EditorCellModel__BehaviorDescriptor.getForegroundColor_idhL6TA5F.invoke(getNode());
}
private int _StyleParameter_QueryFunction_fs6ae3_a3b0() {
return (int) EditorCellModel__BehaviorDescriptor.getFontStyle_idhLcv3Z9.invoke(getNode());
}
private boolean _StyleParameter_QueryFunction_fs6ae3_a4b0() {
return (boolean) EditorCellModel__BehaviorDescriptor.isUnderlined_idhLmqR8u.invoke(getNode());
}
private EditorCell createComponent_fs6ae3_c0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.editor.editor._CloseTag");
return editorCell;
}
}