[settingsSync] Make SettingsSyncMain config path injectable

(cherry picked from commit 4b546a09d8f8dafdf528296190a9d1260cc4fa00)


(cherry picked from commit 9a517a9393e74b89629d5b2e360550398999df4c)

IJ-MR-163106

GitOrigin-RevId: 38b93d2b31ce235b95d66c8ecd9f090f0fd7e00b
This commit is contained in:
Sergey Pak
2025-04-28 16:21:09 +02:00
committed by intellij-monorepo-bot
parent e0c2c254a7
commit d2d6ba6e31

View File

@@ -21,11 +21,11 @@ internal const val SETTINGS_SYNC_STORAGE_FOLDER: String = "settingsSync"
@ApiStatus.Internal
@Service
class SettingsSyncMain(coroutineScope: CoroutineScope) : Disposable {
class SettingsSyncMain(coroutineScope: CoroutineScope, appConfigPath: Path) : Disposable {
constructor(coroutineScope: CoroutineScope) : this(coroutineScope, PathManager.getConfigDir())
val controls: SettingsSyncControls
init {
val appConfigPath = PathManager.getConfigDir()
val componentStore = ApplicationManager.getApplication().stateStore as ComponentStoreImpl
val ideMediator = SettingsSyncIdeMediatorImpl(componentStore = componentStore, rootConfig = appConfigPath, enabledCondition = {
isAvailable() && isSettingsSyncEnabledInSettings()