PersistentStateComponent configuration

Hi all,
I’m looking at the documentation for the PersistentStateComponent and I don’t understand where I’ve to register the projectSettings:

<projectSettings service="com.example.MySettings"/>

Reference Persistent State Component in Split Mode | IntelliJ Platform Plugin SDK

Not sure if it’s a top level element and in which of the several configuration XML should be registered? (plugin.xml, shared.xml, frontend.xml, backend.xml, etc.)

If someone can share a working example I will be grateful.

In addition I’ve a question on how works with passwords, is the keystore replicated in remote development or we need to mirror the value in some transient field and have them replicated in a different way?

hey!

it depends what kind of settings it is: they can exist on frontend and backend only or in shared module with synchronization between frontend and backend as described in docs.

If they store user preference, e.g. UI component last input, color, etc - it is enough to have them on frontend only. If they store some backend related things like OS paths, cli arguments for external processes, etc - backend. if you need them on both ends - shared + sync then

as for the passwords, we have a PasswordSafe api, it is synchronized between frontend and backend, it is recommended to store all secrets there and access on both sides - sync is done under the hood, one should not worry about it

So, if I want to synchronize them I just have to add in the shared module and the configuration in the sharedModule xml.

Ok, yes, I’m using PasswordSafe, I was wondering if the value are synchronized between backend and frontend, if not will be very troublesome to use.

Also which is the minimum IJ version to have the sync working, 2026.1 or works also with 2025.3?

it is 25.3.2 minor update - there the synced password safe is avaailable and a few bugfixes are made for a few related issues discovered