Package csep.ui.syntaxcoloring

Source Code of csep.ui.syntaxcoloring.LexicalHighlightingConfiguration

package csep.ui.syntaxcoloring;

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;

public class LexicalHighlightingConfiguration extends
    DefaultHighlightingConfiguration {

  public final static String REGEX_ID = "regex";
 
  @Override
  public void configure(IHighlightingConfigurationAcceptor acceptor) {
    super.configure(acceptor);
    acceptor.acceptDefaultHighlighting(REGEX_ID, "Regular expression", regexTextStyle());   
  }
 
  public TextStyle regexTextStyle() {
    TextStyle textStyle = defaultTextStyle().copy();
    textStyle.setColor(new RGB(42, 0, 255));
    return textStyle;
  }
}
TOP

Related Classes of csep.ui.syntaxcoloring.LexicalHighlightingConfiguration

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.