Java Code Examples for jetbrains.mps.openapi.editor.style.StyleRegistry

The following are top voted examples for showing how to use jetbrains.mps.openapi.editor.style.StyleRegistry. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: voicemenu   File: WorkSpace_EditorBuilder_a.java   View source code 6 votes vote down vote up
private EditorCell createProperty_ikqrmj_n0() {
  CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
  provider.setRole("default_number");
  provider.setNoTargetText("number");
  provider.setAllowsEmptyTarget(true);
  EditorCell editorCell;
  editorCell = provider.createEditorCell(getEditorContext());
  editorCell.setCellId("property_default_number");
  Style style = new StyleImpl();
  new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
  editorCell.getStyle().putAll(style);
  editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
  SNode attributeConcept = provider.getRoleAttribute();
  if (attributeConcept != null) {
    EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
    return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
  } else
  return editorCell;
}
 
Example 2
Project: DeBrug   File: Venster_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createCollection_pwfrmn_m0() {
  EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
  editorCell.setCellId("Collection_pwfrmn_m0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.DRAW_BORDER, true);
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.WHITE));
  style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
  editorCell.getStyle().putAll(style);
  UitvoerenHandeling.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.addEditorCell(createConstant_pwfrmn_a21a());
  return editorCell;
}
 
Example 3
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3a());
}
 
Example 4
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
  style.set(StyleAttributes.AUTO_DELETABLE, true);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3b());
}
 
Example 5
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3c());
}
 
Example 6
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.darkGray));
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3d());
}
 
Example 7
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3e());
}
 
Example 8
Project: voicemenu   File: Styles_StyleSheet.java   View source code 5 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a2i());
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(new Color(11514923)));
  style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
}
 
Example 9
Project: voicemenu   File: DirectCall_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_stlc2q_h0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Number:");
  editorCell.setCellId("Constant_stlc2q_h0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 10
Project: voicemenu   File: Replay_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_vmvky_c0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Replay");
  editorCell.setCellId("Constant_vmvky_c0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setTransformationMenuLookup(new DefaultTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x6b5142eafd54f3f9L, "jetbrains.mps.samples.VoiceMenu.structure.Replay")));
  editorCell.setDefaultText("");
  editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell));
  return editorCell;
}
 
Example 11
Project: voicemenu   File: Timeout_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_tbvjtx_f0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "File: ");
  editorCell.setCellId("Constant_tbvjtx_f0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 12
Project: voicemenu   File: Timeout_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_tbvjtx_g0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Text: ");
  editorCell.setCellId("Constant_tbvjtx_g0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 13
Project: voicemenu   File: Activity_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_luypn2_h0a() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "File: ");
  editorCell.setCellId("Constant_luypn2_h0a");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  RemoveGreeting.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 14
Project: voicemenu   File: Activity_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_luypn2_i0a() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Text: ");
  editorCell.setCellId("Constant_luypn2_i0a");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  RemoveGreeting.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 15
Project: voicemenu   File: Name_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_5glmts_b0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "BUTTON");
  editorCell.setCellId("Constant_5glmts_b0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 16
Project: voicemenu   File: Name_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_5glmts_e0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " ACTIVITY");
  editorCell.setCellId("Constant_5glmts_e0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 17
Project: Editor2PDF   File: EditorAnnotation_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_rijbc_a0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "> Render Below Editor To");
  editorCell.setCellId("Constant_rijbc_a0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.orange));
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 18
Project: Editor2PDF   File: EditorAnnotation_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createConstant_rijbc_g0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "<");
  editorCell.setCellId("Constant_rijbc_g0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.orange));
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
Example 19
Project: Editor2PDF   File: EditorAnnotation_EditorBuilder_a.java   View source code 5 votes vote down vote up
private EditorCell createCollection_rijbc_h0() {
  EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
  editorCell.setCellId("Collection_rijbc_h0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.BRACKETS_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  editorCell.getStyle().putAll(style);
  editorCell.addEditorCell(createAttributedNodeCell_rijbc_a7a());
  editorCell.setUsesBraces(true);
  return editorCell;
}
 
Example 20
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  style.set(StyleAttributes.UNDERLINED, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 21
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 22
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.UNDERLINED, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 23
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
  style.set(StyleAttributes.UNDERLINED, true);
}
 
Example 24
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.UNDERLINED, true);
}
 
Example 25
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
}
 
Example 26
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
  style.set(StyleAttributes.UNDERLINED, true);
}
 
Example 27
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
}
 
Example 28
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  style.set(StyleAttributes.UNDERLINED, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 29
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 30
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
  style.set(StyleAttributes.UNDERLINED, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
Example 31
Project: DeBrug   File: GN_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
  style.set(StyleAttributes.UNDERLINED, true);
}
 
Example 32
Project: DeBrug   File: Simulatie_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
}
 
Example 33
Project: DeBrug   File: Simulatie_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.lightGray));
}
 
Example 34
Project: voicemenu   File: Styles_StyleSheet.java   View source code 4 votes vote down vote up
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_MAGENTA));
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a2f());
}