I’m developing a custom global verifier for Trados Studio 2024 (v18.0.1.2259), implementing both IGlobalVerifier
and IBilingualVerifier
. My goal is to maintain shared state across multiple files during a batch verification task.
However, during a "Verify Files" batch run, I observed that the Verifier class is instantiated three times, even though I expected a single instance for the entire batch. This was confirmed by adding logging to the constructor.
Here are my questions:
-
Is this expected behavior within Studio’s verification lifecycle?
Could it be related to how merged bilingual documents are processed during batch tasks? -
Is the plugin instantiation tied to each merged document or file?
I want to know if Studio intentionally creates separate instances per document for lifecycle or isolation reasons. -
What’s the best practice for maintaining shared state across files?
For example, should I useISharedObjectsAware
, or perhaps use static/shared storage keyed by batch or project ID.
Any insights or guidance about when and why multiple instances are created, or how to reliably share state across the verification process, would be greatly appreciated!