Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html /
  
  package org.eclipse.xtext.ui.editor.syntaxcoloring;
  
 import  org.eclipse.swt.SWT;
 import  org.eclipse.swt.graphics.RGB;
 import  org.eclipse.xtext.ide.editor.syntaxcoloring.HighlightingStyles;

Author(s):
Jan Kļæ½hnlein - Initial contribution and API
Sebastian Zarnekow - Initial contribution and API
 
 	
 	public static final String KEYWORD_ID = HighlightingStyles.KEYWORD_ID;
 
 	public static final String PUNCTUATION_ID = HighlightingStyles.PUNCTUATION_ID;
 
 	public static final String COMMENT_ID = HighlightingStyles.COMMENT_ID;
 
 	public static final String STRING_ID = HighlightingStyles.STRING_ID;
 
 	public static final String NUMBER_ID = HighlightingStyles.NUMBER_ID;
 
 	public static final String DEFAULT_ID = HighlightingStyles.DEFAULT_ID;
 
 	public static final String INVALID_TOKEN_ID = HighlightingStyles.INVALID_TOKEN_ID;

Since:
2.6
 
 	public static final String TASK_ID = HighlightingStyles.TASK_ID;
 
 	public void configure(IHighlightingConfigurationAcceptor acceptor) {
 		acceptor.acceptDefaultHighlighting("Punctuation character"punctuationTextStyle());
 		acceptor.acceptDefaultHighlighting("Task Tag"taskTextStyle());
 		acceptor.acceptDefaultHighlighting("Invalid Symbol"errorTextStyle());
 	}
 	
 	public TextStyle defaultTextStyle() {
 		TextStyle textStyle = new TextStyle();
 		return textStyle;
 	}
 	
 	public TextStyle errorTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		return textStyle;
 	}
 	
 	public TextStyle numberTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		textStyle.setColor(new RGB(125, 125, 125));
 		return textStyle;
 	}
 
 	public TextStyle stringTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		textStyle.setColor(new RGB(42, 0, 255));
 		return textStyle;
 	}
 
 	public TextStyle commentTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		textStyle.setColor(new RGB(63, 127, 95));
 		return textStyle;
 	}

Since:
2.6
 
 	public TextStyle taskTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		textStyle.setColor(new RGB(127, 159, 191));
 		textStyle.setStyle(SWT.BOLD);
 		return textStyle;
 	}
 
 	public TextStyle keywordTextStyle() {
 		TextStyle textStyle = defaultTextStyle().copy();
 		textStyle.setColor(new RGB(127, 0, 85));
 		textStyle.setStyle(SWT.BOLD);
 		return textStyle;
 	}
 
 		TextStyle textStyle = defaultTextStyle().copy();
 		return textStyle;
 	}
New to GrepCode? Check out our FAQ X