PluginSettingsComponentBase.whenLoadedFromFile method
PluginSettingsComponentBase › whenLoadedFromFile
Waits until the settings have been read fromdata.json at least once.Anything that reads a setting from outside this component has to wait for this, because until the first
loadFromFile completes settings still holds the DEFAULTS — reading it earlier answers with a default rather than with what the user actually stored. That window is easy to miss, since it is empty on a cold start (the workspace layout is not ready yet, so nothing has run) but wide open on a runtime enable from the Community Plugins tab or a re-enable after an update, where a layout-ready handler fires immediately while this component's own async load is still in flight.Resolves immediately once the settings have loaded, so a caller that arrives late is not stranded waiting for an event that has already been raised. Later reloads (an external
data.json change) do not reset it — the question it answers is whether the settings have EVER been read, not whether the most recent read has finished.Signature:
whenLoadedFromFile(): Promise<void>Returns: Promise<void> — A Promise that resolves once the settings have been loaded from the file.