Object NoOpCodeHighlighter
-
- All Implemented Interfaces:
-
org.jetbrains.jewel.foundation.code.highlighting.CodeHighlighter
public class NoOpCodeHighlighter implements CodeHighlighter
-
-
Field Summary
Fields Modifier and Type Field Description public final static NoOpCodeHighlighterINSTANCE
-
Method Summary
-
-
Method Detail
-
highlight
<Error class: unknown class><<Error class: unknown class>> highlight(String code, MimeType mimeType)
Highlights code according to rules for the language specified by mimeType, and returns flow of styled strings. For basic highlighters with rigid color schemes it is enough to return a flow of one element:
return flowOf(highlightedString(code, mimeType))However, some implementations might want gradual highlighting (for example, apply something simple while waiting for the extensive info from server), or they might rely upon a color scheme that can change at any time.
In such cases, they need to produce more than one styled string for the same piece of code, and that's when flows come in handy.
-
-
-
-