Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008 itemis AG ( 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 /
 package org.eclipse.xtext.ui.editor.syntaxcoloring;
import  org.eclipse.jface.preference.FieldEditor;

Dennis H´┐Żbner - Initial contribution and API
Sebastian Zarnekow
public class SyntaxColoringPreferencePage extends AbstractPreferencePage implements IHighlightingConfigurationAcceptorComparator<Triple<StringStringTextStyle>> {
	protected String qualifiedName() {
		return PreferenceStoreAccessor.syntaxColorerTag(getLanguageName());
	public void collectHighlightings(IHighlightingConfiguration configuration) {
	public void acceptDefaultHighlighting(String idString nameTextStyle style) {
	protected void createFieldEditors() {
	protected void refreshAttributes() {
		for (Triple<StringStringTextStylehighlighting : ) {
			.populateTextStyle(highlighting.getFirst(), new TextStyle(), highlighting.getThird());
	public int compare(Triple<StringStringTextStyleleftTriple<StringStringTextStyleright) {
		return left.getSecond().compareTo(right.getSecond());

TODO: better use unqualified names in preference store. Left this workaround not to break API.
	protected void addField(FieldEditor editor) {
		editor.setPreferenceName(qualifiedName() + "." + editor.getPreferenceName());
New to GrepCode? Check out our FAQ X