package jetbrains.mps.baseLanguage.regexp.editor;
/*Generated by MPS */
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.openapi.editor.cells.EditorCell;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.editor.runtime.style.AbstractStyleClass;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import jetbrains.mps.openapi.editor.style.StyleRegistry;
import jetbrains.mps.nodeEditor.MPSColors;
public class RegexpStylesheet_StyleSheet {
/**
*
* @deprecated Since MPS 3.5 use generated StyleClass
*/
@Deprecated
public static void apply_RegexpBrace(Style style, EditorCell editorCell) {
SNode node = (editorCell == null ? null : editorCell.getSNode());
EditorContext editorContext = (editorCell == null ? null : editorCell.getContext());
new RegexpStylesheet_StyleSheet.RegexpBraceStyleClass(editorContext, node).apply(style, editorCell);
}
/**
*
* @deprecated Since MPS 3.5 use generated StyleClass
*/
@Deprecated
public static void apply_LeftRegexpBrace(Style style, EditorCell editorCell) {
SNode node = (editorCell == null ? null : editorCell.getSNode());
EditorContext editorContext = (editorCell == null ? null : editorCell.getContext());
new RegexpStylesheet_StyleSheet.LeftRegexpBraceStyleClass(editorContext, node).apply(style, editorCell);
}
/**
*
* @deprecated Since MPS 3.5 use generated StyleClass
*/
@Deprecated
public static void apply_RightRegexpBrace(Style style, EditorCell editorCell) {
SNode node = (editorCell == null ? null : editorCell.getSNode());
EditorContext editorContext = (editorCell == null ? null : editorCell.getContext());
new RegexpStylesheet_StyleSheet.RightRegexpBraceStyleClass(editorContext, node).apply(style, editorCell);
}
public static class RegexpBraceStyleClass extends AbstractStyleClass {
public RegexpBraceStyleClass(EditorContext editorContext, SNode node) {
super(editorContext, node);
}
@Override
public void apply(Style style, EditorCell editorCell) {
style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_MAGENTA));
style.set(StyleAttributes.MATCHING_LABEL, "regexpBrace");
}
}
public static class LeftRegexpBraceStyleClass extends AbstractStyleClass {
public LeftRegexpBraceStyleClass(EditorContext editorContext, SNode node) {
super(editorContext, node);
}
@Override
public void apply(Style style, EditorCell editorCell) {
new RegexpBraceStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
}
}
public static class RightRegexpBraceStyleClass extends AbstractStyleClass {
public RightRegexpBraceStyleClass(EditorContext editorContext, SNode node) {
super(editorContext, node);
}
@Override
public void apply(Style style, EditorCell editorCell) {
new RegexpBraceStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.PUNCTUATION_LEFT, true);
}
}
}