Java Code Examples for org.eclipse.xtext.ui.editor.utils.TextStyle#setColor()

The following examples show how to use org.eclipse.xtext.ui.editor.utils.TextStyle#setColor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CheckHighlightingConfiguration.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @return a bluish TextStyle for JavaDoc comments
 */
public TextStyle javaDocCommentTextStyle() {
  TextStyle textStyle = defaultTextStyle().copy();
  // CHECKSTYLE:OFF
  textStyle.setColor(new RGB(63, 95, 191));
  // CHECKSTYLE:ON
  return textStyle;
}
 
Example 2
Source File: HighlightingConfiguration.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Default style for all reg-ex literals, colored orange.
 */
public TextStyle regExTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(255, 128, 64)); // orange
	// textStyle.setBackgroundColor(new RGB(233, 242, 248)); // very light blue/greenish thing
	return textStyle;
}
 
Example 3
Source File: SCTHighlightingConfiguration.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public TextStyle keywordTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(14, 48, 131));
	textStyle.setStyle(SWT.BOLD);
	return textStyle;
}
 
Example 4
Source File: SGenHighlightingConfiguration.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public TextStyle keywordTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(14, 48, 131));
	textStyle.setStyle(SWT.BOLD);
	return textStyle;
}
 
Example 5
Source File: DefaultHighlightingConfiguration.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.6
 */
public TextStyle taskTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(127, 159, 191));
	textStyle.setStyle(SWT.BOLD);
	return textStyle;
}
 
Example 6
Source File: SolidityHighlightingConfiguration.java    From solidity-ide with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public TextStyle commentTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(128, 128, 128));
	textStyle.setStyle(SWT.ITALIC);
	return textStyle;
}
 
Example 7
Source File: DotHighlightingConfiguration.java    From gef with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public TextStyle stringTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(153, 76, 0)); // brown
	return textStyle;
}
 
Example 8
Source File: GamlHighlightingConfiguration.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public TextStyle variableTextStyle() {
	final TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setStyle(SWT.BOLD);
	textStyle.setColor(new RGB(28, 125, 180));
	return textStyle;
}
 
Example 9
Source File: GamlHighlightingConfiguration.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public TextStyle operatorTextStyle() {
	final TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setStyle(SWT.BOLD);
	textStyle.setColor(new RGB(46, 93, 78));
	return textStyle;
}
 
Example 10
Source File: DotHighlightingConfiguration.java    From gef with Eclipse Public License 2.0 4 votes vote down vote up
public TextStyle edgeOpTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(0, 153, 0)); // light green
	return textStyle;
}
 
Example 11
Source File: GamlHighlightingConfiguration.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public TextStyle facetTextStyle() {
	final TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setStyle(SWT.BOLD);
	textStyle.setColor(new RGB(154, 72, 71));
	return textStyle;
}
 
Example 12
Source File: GamlHighlightingConfiguration.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
@Override
public TextStyle numberTextStyle() {
	final TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(125, 125, 125));
	return textStyle;
}
 
Example 13
Source File: DotHighlightingConfiguration.java    From gef with Eclipse Public License 2.0 4 votes vote down vote up
private TextStyle htmlContentStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(0, 0, 0)); // black
	return textStyle;
}
 
Example 14
Source File: XbaseHighlightingConfiguration.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public TextStyle field() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(0, 26, 171));
	return textStyle;
}
 
Example 15
Source File: GamlHighlightingConfiguration.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
@Override
public TextStyle stringTextStyle() {
	final TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(116, 167, 251));
	return textStyle;
}
 
Example 16
Source File: HighlightingConfiguration.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Default style for number and string literals, colored blue.
 */
public TextStyle jsDocTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(90, 139, 227));
	return textStyle;
}
 
Example 17
Source File: HighlightingConfiguration.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Default style for number and string literals, colored blue.
 */
public TextStyle literalTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(0, 0, 255));
	return textStyle;
}
 
Example 18
Source File: DefaultHighlightingConfiguration.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public TextStyle commentTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(63, 127, 95));
	return textStyle;
}
 
Example 19
Source File: HighlightingConfiguration.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Default style for type references, colored dark grey.
 */
private TextStyle typeRefTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(140, 140, 140));
	return textStyle;
}
 
Example 20
Source File: HighlightingConfiguration.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Default style for annotations, colored magenta.
 */
private TextStyle annotationTextStyle() {
	TextStyle textStyle = defaultTextStyle().copy();
	textStyle.setColor(new RGB(255, 0, 255));
	return textStyle;
}