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.ModelAccessor;
import jetbrains.mps.nodeEditor.cells.EditorCell_Property;
import jetbrains.mps.openapi.editor.cells.CellActionType;
import jetbrains.mps.editor.runtime.cells.EmptyCellAction;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.lang.editor.test.generation.editor.TestTargetStyleSheet_StyleSheet.testParentStyleStyleClass;
/*package*/ class ModelAccess_ICellStyle_ComponentBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public ModelAccess_ICellStyle_ComponentBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createModelAccess_eenn1o_a();
}
private EditorCell createModelAccess_eenn1o_a() {
ModelAccessor modelAccessor = new ModelAccessor() {
public String getText() {
return null;
}
public void setText(String text) {
}
public boolean isValidText(String text) {
return true;
}
};
EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), modelAccessor, myNode);
editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
editorCell.setAction(CellActionType.BACKSPACE, EmptyCellAction.getInstance());
editorCell.setCellId("ModelAccess_eenn1o_a");
Style style = new StyleImpl();
new testParentStyleStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
}