Interface DecompilerHighlightService
ClangToken
s in the Decompiler UI.
Note: highlights apply to a full token and not strings of text. To highlight a token, you
create an instance of the CTokenHighlightMatcher
to pass to one of the
createHighlighter(String, CTokenHighlightMatcher)
methods of this interface.
There is no limit to the number of highlighters that may be installed. If multiple highlights overlap, then their colors will be blended. The number of color blends may be limited for performance reasons.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DecompilerHighlighter
Creates a highlighter that will use the given matcher to create highlights as functions get decompiled.createHighlighter
(Function function, CTokenHighlightMatcher tm) Creates a highlighter that will use the given matcher to create highlights as functions get decompiled.default DecompilerHighlighter
A version ofcreateHighlighter(String, CTokenHighlightMatcher)
that allows clients to specify an ID.createHighlighter
(String id, Function function, CTokenHighlightMatcher tm) A version ofcreateHighlighter(String, CTokenHighlightMatcher)
that allows clients to specify an ID.
-
Method Details
-
createHighlighter
Creates a highlighter that will use the given matcher to create highlights as functions get decompiled. The highlighter created will be applied to every decompiled function.- Parameters:
tm
- the matcher- Returns:
- the new highlighter
-
createHighlighter
Creates a highlighter that will use the given matcher to create highlights as functions get decompiled. The highlighter created will only be applied to the given function.- Parameters:
function
- the function to which the highlighter will be appliedtm
- the matcher- Returns:
- the new highlighter
- See Also:
-
createHighlighter
A version ofcreateHighlighter(String, CTokenHighlightMatcher)
that allows clients to specify an ID. This ID will be used to ensure that any existing highlighters with that ID will be removed before creating a new highlighter. The highlighter created will be applied to every decompiled function.This method is convenient for scripts, since a script cannot hold on to any created highlighters between repeated script executions. A good value for script writers to use is the name of their script class.
- Parameters:
id
- the IDtm
- the matcher- Returns:
- the new highlighter
-
createHighlighter
A version ofcreateHighlighter(String, CTokenHighlightMatcher)
that allows clients to specify an ID. This ID will be used to ensure that any existing highlighters with that ID will be removed before creating a new highlighter. The highlighter created will only be applied to the given function.This method is convenient for scripts, since a script cannot hold on to any created highlighters between repeated script executions. A good value for script writers to use is the name of their script class.
- Parameters:
id
- the IDfunction
- the function to which the highlighter will be appliedtm
- the matcher- Returns:
- the new highlighter
-