|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MarkupModel
Provides services for highlighting ranges of text in a document, painting markers on the gutter and so on, and for retrieving information about highlighted ranges.
Editor.getMarkupModel(),
Document.getMarkupModel(com.intellij.openapi.project.Project)| Method Summary | |
|---|---|
RangeHighlighter |
addLineHighlighter(int line,
int layer,
TextAttributes textAttributes)
Adds a highlighter covering the specified line in the document. |
RangeHighlighter |
addRangeHighlighter(int startOffset,
int endOffset,
int layer,
TextAttributes textAttributes,
HighlighterTargetArea targetArea)
Adds a highlighter covering the specified range of the document, which can modify the attributes used for text rendering, add a gutter marker and so on. |
RangeHighlighter[] |
getAllHighlighters()
Returns all highlighter instances contained in the model. |
Document |
getDocument()
Returns the document to which the markup model is attached. |
void |
removeAllHighlighters()
Removes all highlighter instances. |
void |
removeHighlighter(RangeHighlighter rangeHighlighter)
Removes the specified highlighter instance. |
| Methods inherited from interface com.intellij.openapi.util.UserDataHolder |
|---|
getUserData, putUserData |
| Method Detail |
|---|
@NotNull Document getDocument()
@NotNull
RangeHighlighter addRangeHighlighter(int startOffset,
int endOffset,
int layer,
@Nullable
TextAttributes textAttributes,
HighlighterTargetArea targetArea)
RangeMarker instances and use the same rules for tracking
the range after document changes.
startOffset - the start offset of the range to highlight.endOffset - the end offset of the range to highlight.layer - relative priority of the highlighter (highlighters with higher
layer number override highlighters with lower layer number;
layer number values for standard IDEA highlighters are given in
HighlighterLayer class)textAttributes - the attributes to use for highlighting, or null if the highlighter
does not modify the text attributes.targetArea - type of highlighting (specific range or all full lines covered by the range).
@NotNull
RangeHighlighter addLineHighlighter(int line,
int layer,
@Nullable
TextAttributes textAttributes)
line - the line number of the line to highlight.layer - relative priority of the highlighter (highlighters with higher
layer number override highlighters with lower layer number;
layer number values for standard IDEA highlighters are given in
HighlighterLayer class)textAttributes - the attributes to use for highlighting, or null if the highlighter
does not modify the text attributes.
void removeHighlighter(RangeHighlighter rangeHighlighter)
rangeHighlighter - the highlighter to remove.void removeAllHighlighters()
@NotNull RangeHighlighter[] getAllHighlighters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||