package jetbrains.mps.lang.editor.formsTests.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.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
/*package*/ class UsesTextCheckbox_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public UsesTextCheckbox_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_c4zoug_a();
}
private EditorCell createCollection_c4zoug_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_c4zoug_a");
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
Checkbox_ActionMap_4.setCellActions(editorCell, myNode, getEditorContext());
editorCell.addKeyMap(new Checkbox_KeyMap_4());
editorCell.addEditorCell(createAlternation_c4zoug_a0());
return editorCell;
}
private EditorCell createAlternation_c4zoug_a0() {
boolean alternationCondition = true;
alternationCondition = nodeCondition_c4zoug_a0a();
EditorCell editorCell = null;
if (alternationCondition) {
editorCell = createConstant_c4zoug_a0a();
} else {
editorCell = createConstant_c4zoug_a0a_0();
}
return editorCell;
}
private boolean nodeCondition_c4zoug_a0a() {
return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0xafb9a5fdbc5d4169L, 0xa22542d8823d623aL, 0x4a35f271d9f26e94L, 0x4a35f271d9f26e95L, "property"));
}
private EditorCell createConstant_c4zoug_a0a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "x");
editorCell.setCellId("Constant_c4zoug_a0a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_c4zoug_a0a_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " ");
editorCell.setCellId("Constant_c4zoug_a0a_0");
editorCell.setDefaultText("");
return editorCell;
}
}