package jetbrains.mps.lang.editor.test.generation.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.lang.editor.test.generation.editor.TestTargetStyleSheet_StyleSheet.testStyleStyleClass;
import jetbrains.mps.lang.editor.test.generation.editor.TestTargetStyleKeyPack_KeyPack.testKey_StyleKey;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import jetbrains.mps.openapi.editor.style.StyleRegistry;
import jetbrains.mps.nodeEditor.MPSColors;
import java.awt.Color;
import jetbrains.mps.editor.runtime.style.CaretPosition;
import jetbrains.mps.editor.runtime.style.Padding;
import jetbrains.mps.editor.runtime.style.Measure;
import jetbrains.mps.nodeEditor.MPSFonts;
import jetbrains.mps.editor.runtime.style.CellAlign;
import jetbrains.mps.editor.runtime.style.ShowBoundariesArea;
import jetbrains.mps.editor.runtime.style.TableComponent;
import jetbrains.mps.util.Pair;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Superscript;
import jetbrains.mps.editor.runtime.style.ScriptKind;
/*package*/ class Constant_IStyleContainer_ComponentBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public Constant_IStyleContainer_ComponentBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_big7wf_a();
}
private EditorCell createCollection_big7wf_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_big7wf_a");
editorCell.addEditorCell(createConstant_big7wf_a0());
editorCell.addEditorCell(createCollection_big7wf_b0());
return editorCell;
}
private EditorCell createConstant_big7wf_a0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "AllStyleClassItems");
editorCell.setCellId("Constant_big7wf_a0");
Style style = new StyleImpl();
new testStyleStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
new testKey_StyleKey().apply(style);
if (_StyleParameter_QueryFunction_big7wf_a2a0()) {
new testStyleStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
}
if (_StyleParameter_QueryFunction_big7wf_a3a0()) {
new testStyleStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
}
style.set(StyleAttributes.getInstance().<String>getAttribute("jetbrains.mps.lang.editor.test.generation", "testStringAttribute"), _StyleParameter_QueryFunction_big7wf_a4a0());
style.set(StyleAttributes.AUTO_DELETABLE, true);
style.set(StyleAttributes.AUTO_DELETABLE, _StyleParameter_QueryFunction_big7wf_a6a0());
style.set(StyleAttributes.BASE_LINE_CELL, true);
style.set(StyleAttributes.BASE_LINE_CELL, _StyleParameter_QueryFunction_big7wf_a8a0());
style.set(StyleAttributes.DRAW_BORDER, false);
style.set(StyleAttributes.DRAW_BORDER, _StyleParameter_QueryFunction_big7wf_a01a0());
style.set(StyleAttributes.DRAW_BRACKETS, false);
style.set(StyleAttributes.DRAW_BRACKETS, _StyleParameter_QueryFunction_big7wf_a21a0());
style.set(StyleAttributes.EDITABLE, false);
style.set(StyleAttributes.EDITABLE, _StyleParameter_QueryFunction_big7wf_a41a0());
style.set(StyleAttributes.FIRST_POSITION_ALLOWED, false);
style.set(StyleAttributes.FIRST_POSITION_ALLOWED, _StyleParameter_QueryFunction_big7wf_a61a0());
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, _StyleParameter_QueryFunction_big7wf_a81a0());
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, _StyleParameter_QueryFunction_big7wf_a02a0());
style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true);
style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, _StyleParameter_QueryFunction_big7wf_a22a0());
style.set(StyleAttributes.INDENT_LAYOUT_ON_NEW_LINE, true);
style.set(StyleAttributes.INDENT_LAYOUT_ON_NEW_LINE, _StyleParameter_QueryFunction_big7wf_a42a0());
style.set(StyleAttributes.LAST_POSITION_ALLOWED, true);
style.set(StyleAttributes.LAST_POSITION_ALLOWED, _StyleParameter_QueryFunction_big7wf_a62a0());
style.set(StyleAttributes.PUNCTUATION_LEFT, true);
style.set(StyleAttributes.PUNCTUATION_LEFT, _StyleParameter_QueryFunction_big7wf_a82a0());
style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
style.set(StyleAttributes.PUNCTUATION_RIGHT, _StyleParameter_QueryFunction_big7wf_a03a0());
style.set(StyleAttributes.READ_ONLY, true);
style.set(StyleAttributes.READ_ONLY, _StyleParameter_QueryFunction_big7wf_a23a0());
style.set(StyleAttributes.SELECTABLE, true);
style.set(StyleAttributes.SELECTABLE, _StyleParameter_QueryFunction_big7wf_a43a0());
style.set(StyleAttributes.STRIKE_OUT, true);
style.set(StyleAttributes.STRIKE_OUT, _StyleParameter_QueryFunction_big7wf_a63a0());
style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a83a0()));
style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.BACKGROUND_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a04a0().o1 : _StyleParameter_QueryFunction_big7wf_a04a0().o2));
style.set(StyleAttributes.BRACKETS_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
style.set(StyleAttributes.BRACKETS_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a24a0()));
style.set(StyleAttributes.BRACKETS_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.BRACKETS_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a44a0().o1 : _StyleParameter_QueryFunction_big7wf_a44a0().o2));
style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN, StyleRegistry.getInstance().getSimpleColor(MPSColors.cyan)));
style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a64a0()));
style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.TEXT_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a84a0().o1 : _StyleParameter_QueryFunction_big7wf_a84a0().o2));
style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a05a0()));
style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.NULL_TEXT_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a25a0().o1 : _StyleParameter_QueryFunction_big7wf_a25a0().o2));
style.set(StyleAttributes.SELECTED_TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
style.set(StyleAttributes.SELECTED_TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a45a0()));
style.set(StyleAttributes.SELECTED_TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.SELECTED_TEXT_BACKGROUND_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a65a0().o1 : _StyleParameter_QueryFunction_big7wf_a65a0().o2));
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.cyan));
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(_StyleParameter_QueryFunction_big7wf_a85a0()));
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(291)));
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, (!(StyleRegistry.getInstance().isDarkTheme()) ? _StyleParameter_QueryFunction_big7wf_a06a0().o1 : _StyleParameter_QueryFunction_big7wf_a06a0().o2));
style.set(StyleAttributes.DEFAULT_CARET_POSITION, CaretPosition.LAST);
style.set(StyleAttributes.DEFAULT_CARET_POSITION, CaretPosition.FIRST);
style.set(StyleAttributes.DEFAULT_CARET_POSITION, CaretPosition.LAST);
style.set(StyleAttributes.HORIZONTAL_GAP, new Padding(12, Measure.SPACES));
style.set(StyleAttributes.PADDING_BOTTOM, new Padding(1, Measure.PIXELS));
style.set(StyleAttributes.PADDING_LEFT, new Padding(1, Measure.SPACES));
style.set(StyleAttributes.PADDING_RIGHT, new Padding(0, Measure.SPACES));
style.set(StyleAttributes.PADDING_TOP, new Padding(0, Measure.SPACES));
style.set(StyleAttributes.FONT_SIZE, 15);
style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_big7wf_a07a0());
style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
style.set(StyleAttributes.FONT_STYLE, _StyleParameter_QueryFunction_big7wf_a27a0());
style.set(StyleAttributes.HORIZONTAL_ALIGN, CellAlign.CENTER);
style.set(StyleAttributes.LAYOUT_CONSTRAINT, "noflow");
style.set(StyleAttributes.MATCHING_LABEL, (String) null);
style.set(StyleAttributes.MATCHING_LABEL, "labelName");
style.set(StyleAttributes.MATCHING_LABEL, matchingNode_big7wf_a77a0());
style.set(StyleAttributes.MAX_WIDTH, 10);
style.set(StyleAttributes.MAX_WIDTH, _StyleParameter_QueryFunction_big7wf_a97a0());
style.set(StyleAttributes.NAVIGATABLE_NODE, _StyleParameter_QueryFunction_big7wf_a08a0());
style.set(StyleAttributes.NAVIGATABLE_REFERENCE, "navigable");
style.set(StyleAttributes.PARAMETERS_INFORMATION, new TestTargetParametersInformation());
style.set(StyleAttributes.POSITION_CHILDREN, "next-line");
style.set(StyleAttributes.POSITION, "indented");
style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER_AND_EDITOR);
style.set(StyleAttributes.RT_ANCHOR_TAG, "ext_1_RTransform");
style.set(StyleAttributes.RT_ANCHOR_TAG, "ext_1_RTransform|ext_2_RTransform");
style.set(StyleAttributes.TABLE_COMPONENT, TableComponent.VERTICAL_COLLECTION);
new testStyleStyleClass(getEditorContext(), getNode()).unapply(style, editorCell);
new testKey_StyleKey().unapply(style);
style.set(StyleAttributes.UNDERLINED, false);
style.set(StyleAttributes.UNDERLINED, _StyleParameter_QueryFunction_big7wf_a29a0());
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private boolean _StyleParameter_QueryFunction_big7wf_a2a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a3a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private String _StyleParameter_QueryFunction_big7wf_a4a0() {
boolean var = getEditorContext() != null || getNode() != null;
return String.valueOf(var);
}
private boolean _StyleParameter_QueryFunction_big7wf_a6a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a8a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a01a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a21a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a41a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a61a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a81a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a02a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a22a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a42a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a62a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a82a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a03a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a23a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a43a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private boolean _StyleParameter_QueryFunction_big7wf_a63a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private Color _StyleParameter_QueryFunction_big7wf_a83a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a04a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Color _StyleParameter_QueryFunction_big7wf_a24a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a44a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Color _StyleParameter_QueryFunction_big7wf_a64a0() {
boolean var = getEditorContext() != null || getNode() != null;
return null;
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a84a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Color _StyleParameter_QueryFunction_big7wf_a05a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a25a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Color _StyleParameter_QueryFunction_big7wf_a45a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a65a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Color _StyleParameter_QueryFunction_big7wf_a85a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private Pair<Color, Color> _StyleParameter_QueryFunction_big7wf_a06a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private int _StyleParameter_QueryFunction_big7wf_a07a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? 10 : 20);
}
private int _StyleParameter_QueryFunction_big7wf_a27a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? 10 : 20);
}
private String matchingNode_big7wf_a77a0() {
boolean var = getNode() != null;
return (var ? "l1" : "l2");
}
private int _StyleParameter_QueryFunction_big7wf_a97a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? 10 : 20);
}
private SNode _StyleParameter_QueryFunction_big7wf_a08a0() {
boolean var = getEditorContext() != null || getNode() != null;
return (var ? null : null);
}
private boolean _StyleParameter_QueryFunction_big7wf_a29a0() {
boolean var = getEditorContext() != null || getNode() != null;
return var;
}
private EditorCell createCollection_big7wf_b0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Superscript());
editorCell.setCellId("Collection_big7wf_b0");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_big7wf_a1a());
return editorCell;
}
private EditorCell createConstant_big7wf_a1a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "scriptKind");
editorCell.setCellId("Constant_big7wf_a1a");
Style style = new StyleImpl();
style.set(StyleAttributes.SCRIPT_KIND, ScriptKind.NORMAL);
style.set(StyleAttributes.SCRIPT_KIND, ScriptKind.SUBSCRIPT);
style.set(StyleAttributes.SCRIPT_KIND, ScriptKind.SUPERSCRIPT);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
}