/**
* Copyright (c) 2013 committers of YAKINDU 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
* Contributors:
* committers of YAKINDU - initial API and implementation
*
*/
package org.yakindu.sct.generator.genmodel.ui.highlighting;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfigurationAcceptor;
import org.eclipse.xtext.ui.editor.utils.TextStyle;
/**
*
* @author andreas muelder - Initial contribution and API
*
*/
public class SGenHighlightingConfiguration extends DefaultHighlightingConfiguration {
public static final String DEPRECATION = "deprecation";
@Override
public void configure(IHighlightingConfigurationAcceptor acceptor) {
super.configure(acceptor);
acceptor.acceptDefaultHighlighting(DEPRECATION, "Deprecation", deprecationTextStyle());
}
public TextStyle deprecationTextStyle() {
TextStyle textStyle = defaultTextStyle().copy();
textStyle.setStyle(SWT.UNDERLINE_SQUIGGLE);
return textStyle;
}
@Override
public TextStyle keywordTextStyle() {
TextStyle textStyle = defaultTextStyle().copy();
textStyle.setColor(new RGB(14, 48, 131));
textStyle.setStyle(SWT.BOLD);
return textStyle;
}
}