Package-level declarations
Types
A fix for a diagnostic: replacement for its range, shown on the menu as label. A label says what a fix does where the replacement alone would not, such as "Remove “the”" for an empty replacement.
The underline of one diagnostic, on layer. It carries the diagnostic's message and fixes itself, so they move with the span as the text around it is edited. By default it is on the layer a TextDiagnosticsState reads, replaces and clears as its own; one on a layer of its own is left to that layer's owner.
Finds issues other than spelling, such as grammar, in lines of text.
Underlines what a TextDiagnosticsChecker finds in textState, line by line. Results are kept by line text, so after an edit only the lines that changed go to TextDiagnosticsChecker.check; TextDiagnosticsChecker.checkText sees the whole text every time. Pass it to com.darkrockstudios.texteditor.spellcheck.SpellCheckingTextEditor, which refreshes it as the text changes and opens a menu of the message and fixes on an underline. The underlines are on the diagnostics decoration layer, which it reads and replaces by line; a state made for the same editor later takes over the underlines an earlier one left.
Properties
The default underline color: blue, apart from spell check's red.
The default underline color of a DiagnosticSeverity.Suggestion: a muted gold.
Functions
A LineDiagnostic whose fixes are replacements, each shown as itself.
Remembers a TextDiagnosticsState for textState, following checker and the colors as they change. Pass a stable checker: a new instance checks the whole text again.