com.intellij.openapi.editor.markup
Interface RangeHighlighter

All Superinterfaces:
RangeMarker, UserDataHolder

public interface RangeHighlighter
extends RangeMarker

Represents a range of text in the document which has specific markup (special text attributes, line marker, gutter icon, error stripe marker or line separator).

See Also:
MarkupModel.addRangeHighlighter(int, int, int, TextAttributes, HighlighterTargetArea), Annotation

Method Summary
 MarkupEditorFilter getEditorFilter()
          Gets the filter which can disable the highlighter in specific editor instances.
 java.awt.Color getErrorStripeMarkColor()
          Returns the color of the marker drawn in the error stripe in the area covered by the highlighter.
 java.lang.Object getErrorStripeTooltip()
          Returns the object whose toString() method is called to get the text of the tooltip for the error stripe marker added by the highlighter.
 GutterIconRenderer getGutterIconRenderer()
          Returns the renderer used for drawing gutter icons in the area covered by the highlighter.
 int getLayer()
          Returns the relative priority of the highlighter (higher priority highlighters can override lower priority ones; layer number values for standard IDEA highlighters are given in HighlighterLayer class).
 LineMarkerRenderer getLineMarkerRenderer()
          Returns the renderer used for drawing line markers in the area covered by the highlighter, and optionally for processing mouse events over the markers.
 java.awt.Color getLineSeparatorColor()
          Returns the color of the separator drawn above or below the range covered by the highlighter.
 SeparatorPlacement getLineSeparatorPlacement()
          Returns the placement of the separator drawn by the range highlighter (above or below the range).
 HighlighterTargetArea getTargetArea()
          Returns the value indicating whether the highlighter affects a range of text or a sequence of of entire lines in the specified range.
 TextAttributes getTextAttributes()
          Returns the text attributes used for highlighting.
 boolean isThinErrorStripeMark()
          Returns the value indicating whether the error stripe marker has reduced width (like the markers used to highlight changed lines).
 void setEditorFilter(MarkupEditorFilter filter)
          Sets the filter which can disable the highlighter in specific editor instances.
 void setErrorStripeMarkColor(java.awt.Color color)
          Sets the color of the marker drawn in the error stripe in the area covered by the highlighter.
 void setErrorStripeTooltip(java.lang.Object tooltipObject)
          Sets the object whose toString() method is called to get the text of the tooltip for the error stripe marker added by the highlighter.
 void setGutterIconRenderer(GutterIconRenderer renderer)
          Sets the renderer used for drawing gutter icons in the area covered by the highlighter.
 void setLineMarkerRenderer(LineMarkerRenderer renderer)
          Sets the renderer used for drawing line markers in the area covered by the highlighter, and optionally for processing mouse events over the markers.
 void setLineSeparatorColor(java.awt.Color color)
          Sets the color of the separator drawn above or below the range covered by the highlighter.
 void setLineSeparatorPlacement(SeparatorPlacement placement)
          Sets the placement of the separator drawn by the range highlighter (above or below the range).
 void setThinErrorStripeMark(boolean value)
          Sets the value indicating whether the error stripe marker has reduced width (like the markers used to highlight changed lines).
 
Methods inherited from interface com.intellij.openapi.editor.RangeMarker
getDocument, getEndOffset, getStartOffset, isValid, setGreedyToLeft, setGreedyToRight
 
Methods inherited from interface com.intellij.openapi.util.UserDataHolder
getUserData, putUserData
 

Method Detail

getLayer

int getLayer()
Returns the relative priority of the highlighter (higher priority highlighters can override lower priority ones; layer number values for standard IDEA highlighters are given in HighlighterLayer class).

Returns:
the highlighter priority.

getTargetArea

HighlighterTargetArea getTargetArea()
Returns the value indicating whether the highlighter affects a range of text or a sequence of of entire lines in the specified range.

Returns:
the highlighter target area.

getTextAttributes

@Nullable
TextAttributes getTextAttributes()
Returns the text attributes used for highlighting.

Returns:
the attributes to use for highlighting, or null if the highlighter does not modify the text attributes.

getLineMarkerRenderer

@Nullable
LineMarkerRenderer getLineMarkerRenderer()
Returns the renderer used for drawing line markers in the area covered by the highlighter, and optionally for processing mouse events over the markers. Line markers are drawn over the folding area and are used, for example, to highlight modified lines in files under source control.

Returns:
the renderer instance, or null if the highlighter does not add any line markers.
See Also:
ActiveGutterRenderer

setLineMarkerRenderer

void setLineMarkerRenderer(@Nullable
                           LineMarkerRenderer renderer)
Sets the renderer used for drawing line markers in the area covered by the highlighter, and optionally for processing mouse events over the markers. Line markers are drawn over the folding area and are used, for example, to highlight modified lines in files under source control.

Parameters:
renderer - the renderer instance, or null if the highlighter does not add any line markers.
See Also:
ActiveGutterRenderer

getGutterIconRenderer

@Nullable
GutterIconRenderer getGutterIconRenderer()
Returns the renderer used for drawing gutter icons in the area covered by the highlighter. Gutter icons are drawn to the left of the folding area and can be used, for example, to mark implemented or overridden methods.

Returns:
the renderer instance, or null if the highlighter does not add any gutter icons.

setGutterIconRenderer

void setGutterIconRenderer(@Nullable
                           GutterIconRenderer renderer)
Sets the renderer used for drawing gutter icons in the area covered by the highlighter. Gutter icons are drawn to the left of the folding area and can be used, for example, to mark implemented or overridden methods.

Parameters:
renderer - the renderer instance, or null if the highlighter does not add any gutter icons.

getErrorStripeMarkColor

@Nullable
java.awt.Color getErrorStripeMarkColor()
Returns the color of the marker drawn in the error stripe in the area covered by the highlighter.

Returns:
the error stripe marker color, or null if the highlighter does not add any error stripe markers.

setErrorStripeMarkColor

void setErrorStripeMarkColor(@Nullable
                             java.awt.Color color)
Sets the color of the marker drawn in the error stripe in the area covered by the highlighter.

Parameters:
color - the error stripe marker color, or null if the highlighter does not add any error stripe markers.

getErrorStripeTooltip

@Nullable
java.lang.Object getErrorStripeTooltip()
Returns the object whose toString() method is called to get the text of the tooltip for the error stripe marker added by the highlighter.

Returns:
the error stripe tooltip objects, or null if the highlighter does not add any error stripe markers or the marker has no tooltip.

setErrorStripeTooltip

void setErrorStripeTooltip(@Nullable
                           java.lang.Object tooltipObject)
Sets the object whose toString() method is called to get the text of the tooltip for the error stripe marker added by the highlighter.

Parameters:
tooltipObject - the error stripe tooltip objects, or null if the highlighter does not add any error stripe markers or the marker has no tooltip.

isThinErrorStripeMark

boolean isThinErrorStripeMark()
Returns the value indicating whether the error stripe marker has reduced width (like the markers used to highlight changed lines).

Returns:
true if the marker has reduced width, false otherwise.

setThinErrorStripeMark

void setThinErrorStripeMark(boolean value)
Sets the value indicating whether the error stripe marker has reduced width (like the markers used to highlight changed lines).

Parameters:
value - true if the marker has reduced width, false otherwise.

getLineSeparatorColor

@Nullable
java.awt.Color getLineSeparatorColor()
Returns the color of the separator drawn above or below the range covered by the highlighter.

Returns:
the separator color, or null if the highlighter does not add a line separator.

setLineSeparatorColor

void setLineSeparatorColor(@Nullable
                           java.awt.Color color)
Sets the color of the separator drawn above or below the range covered by the highlighter.

Parameters:
color - the separator color, or null if the highlighter does not add a line separator.

getLineSeparatorPlacement

@Nullable
SeparatorPlacement getLineSeparatorPlacement()
Returns the placement of the separator drawn by the range highlighter (above or below the range).

Returns:
the separator placement, or null if the highlighter does not add a line separator.

setLineSeparatorPlacement

void setLineSeparatorPlacement(@Nullable
                               SeparatorPlacement placement)
Sets the placement of the separator drawn by the range highlighter (above or below the range).

Parameters:
placement - the separator placement, or null if the highlighter does not add a line separator.

setEditorFilter

void setEditorFilter(@Nullable
                     MarkupEditorFilter filter)
Sets the filter which can disable the highlighter in specific editor instances.

Parameters:
filter - the filter controlling the highlighter availability, or null if the highlighter is available in all editors.

getEditorFilter

@Nullable
MarkupEditorFilter getEditorFilter()
Gets the filter which can disable the highlighter in specific editor instances.

Returns:
the filter controlling the highlighter availability, or null if the highlighter is available in all editors.