Файли
openidea/sdk/rust
Ainul YaqinтаAkin01 e08531c458 feat(plugins): project-scoped debounce and supersession for plugin refresh work (API 1.18) (#5002)
events.subscribe-paths-with-options adds an optional debounce-ms (up to 5 s) that coalesces files-changed deltas on the host, so bursts of edits don't run a plugin's discovery again and again. workspace.project.generation returns a project's state generation, which moves on every file change; FilesChanged carries the project root and generation. Registering run targets or run configurations computed for a superseded generation fails with Error::Stale. A new project-closed event tells subscribed plugins a project closed after its queued events are dropped and its run targets and configurations are withdrawn.

On top of the contributor's work: closing one project no longer cancels a plugin instance's in-flight work for other projects (an instance serves every project; results for the closed one are refused because its generation moved on), the generation is bumped on close, the generation is attached only for plugins declaring API 1.18 so older plugins' registrations are never refused, and the API now ships as part of 1.18 with the components rebuilt.

Closes #4760

Co-authored-by: Akin01 <[email protected]>
2026-11-26 20:41:06 +08:00
..