org.sonar.api.batch.sensor.highlighting
Interface HighlightingBuilder


@Beta
public interface HighlightingBuilder

Experimental, do not use.

This builder is used to define syntax highlighting (aka code coloration) on files.

Since:
4.5

Method Summary
 void done()
          Call this method only once when your are done with defining highlighting of the file.
 HighlightingBuilder highlight(int startOffset, int endOffset, TypeOfText typeOfText)
          Call this method to indicate the type of text in a range.
 

Method Detail

highlight

HighlightingBuilder highlight(int startOffset,
                              int endOffset,
                              TypeOfText typeOfText)
Call this method to indicate the type of text in a range.

Parameters:
startOffset - Starting position in file for this type of text. Beginning of a file starts with offset '0'.
endOffset - End position in file for this type of text.
typeOfText - see TypeOfText values.

done

void done()
Call this method only once when your are done with defining highlighting of the file.

Throws:
IllegalStateException - if you have defined overlapping highlighting


Copyright © 2009–2015 SonarSource. All rights reserved.