Files
sdk/pkg/analysis_server/lib/src/status
Sam Rawlins 8fe3e5244f analyzer: Greatly simplify the AnalysisOptionsMap
The general idea is to remove the need for the subclass,
`_SharedOptionsMap` and the entry class, `OptionsMapEntry`, by wrapping
a Map instead of a `List<OptionsMapEntry>`.

When we use a Map internally, the `getOptions` and `_allOptions`
implementations collapse into one. And we can set the `sharedOptions`
constructor parameter to be the `_defaultOptions` field. With these
changes, we do not need the `_SharedOptionsMap` class.

The `entries` field was previously a commonly used public API for the
AnalysisOptionsMap class, but we can replace it with a `folders` getter
and a `options` getter.

Instead of sorting the map of options on `add` (as was previously done),
we use a `SplayTreeMap` to keep the options sorted.

Change-Id: I9e51931731f4cb4382f2f61f272d53ee15529642
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-07 13:13:01 -08:00
..