FindMyFiles

FindMyFiles.Highlighting

MatchHighlighter Class

Compiles query text into a CompiledHighlighter. Mirrors the engine tokenizer/compiler (engine/crates/fmf-core/src/query/ast.rs and compile.rs) for the subset that can be highlighted exactly, and drops the rest (see CompiledHighlighter).

public static class MatchHighlighter

Inheritance System.Object → MatchHighlighter

Methods

MatchHighlighter.Compile(string) Method

Compile query (the user's raw text, before any focused-mode rewrite) into a highlighter. Case handling is smart-case, matching the product default (MainViewModel uses FmfCase.Smart). An empty/whitespace or filter-only query yields Empty.

public static FindMyFiles.Highlighting.CompiledHighlighter Compile(string query);

Parameters

query System.String

Raw user query text.

Returns

CompiledHighlighter
A highlighter for the query, or Empty when nothing is highlightable.

MatchHighlighter.CompileRegex(string, RegexScope) Method

Compile a whole-query regex highlighter (regex mode, ADR-0023): the entire query is one pattern, emphasized in the name or full path per scope. Smart-case (insensitive unless the pattern carries an uppercase-ish scalar), matching the product default. A pattern .NET cannot compile yields Empty — the engine reports the syntax error; the highlighter just stays dark rather than guess.

public static FindMyFiles.Highlighting.IHighlighter CompileRegex(string query, FindMyFiles.Engine.RegexScope scope);

Parameters

query System.String

Raw user query text, treated as one regex pattern.

scope RegexScope

Which haystack the pattern runs against (name or full path).

Returns

IHighlighter
A regex highlighter, or Empty when the pattern cannot compile.