From a114659a115f7b130035272de986517837ca738e Mon Sep 17 00:00:00 2001 From: axiom Date: Fri, 7 Mar 2025 22:05:27 +0400 Subject: [PATCH] OPENIDE remove backup-and-sync plugin (cherry picked from commit 675a1b5828c4b2570c386b469a440d5512713d02) --- .idea/modules.xml | 6 ++-- .../resources/META-INF/IdeaPlugin.xml | 4 +++ intellij.idea.community.main.iml | 4 +++ .../intellij/build/BaseIdeaProperties.kt | 5 ++- .../ide/bootstrap/ApplicationLoader.kt | 3 +- .../settingsSync/core/SettingsProviderTest.kt | 8 +++-- .../core/SettingsSyncRealIdeTest.kt | 32 ++++++++++--------- python/build/plugin-list.txt | 1 - .../resources/META-INF/PyCharmCorePlugin.xml | 5 ++- 9 files changed, 44 insertions(+), 24 deletions(-) diff --git a/.idea/modules.xml b/.idea/modules.xml index 5f5de3480f10..cbc444795e6c 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -1,3 +1,7 @@ + @@ -1042,8 +1046,6 @@ - - diff --git a/community-resources/resources/META-INF/IdeaPlugin.xml b/community-resources/resources/META-INF/IdeaPlugin.xml index f10111e64297..e883e057c821 100644 --- a/community-resources/resources/META-INF/IdeaPlugin.xml +++ b/community-resources/resources/META-INF/IdeaPlugin.xml @@ -1,3 +1,7 @@ + diff --git a/intellij.idea.community.main.iml b/intellij.idea.community.main.iml index 754947313a49..33950e1551f0 100644 --- a/intellij.idea.community.main.iml +++ b/intellij.idea.community.main.iml @@ -1,3 +1,7 @@ + diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/BaseIdeaProperties.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/BaseIdeaProperties.kt index 180b53fe963b..8642ae3dc34a 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/BaseIdeaProperties.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/BaseIdeaProperties.kt @@ -1,4 +1,8 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. +@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog") + package org.jetbrains.intellij.build import kotlinx.collections.immutable.PersistentList @@ -22,7 +26,6 @@ val IDEA_BUNDLED_PLUGINS: PersistentList = DEFAULT_BUNDLED_PLUGINS + seq "intellij.emojipicker", "intellij.textmate", "intellij.editorconfig", - "intellij.settingsSync", "intellij.configurationScript", "intellij.json", "intellij.yaml", diff --git a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ApplicationLoader.kt b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ApplicationLoader.kt index 9f4523921440..dfedd9de702c 100644 --- a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ApplicationLoader.kt +++ b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ApplicationLoader.kt @@ -1,4 +1,6 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:JvmName("ApplicationLoader") @file:Internal @file:Suppress("RAW_RUN_BLOCKING", "ReplaceJavaStaticMethodWithKotlinAnalog") @@ -265,7 +267,6 @@ internal suspend fun loadApp( private val asyncAppListenerAllowListForNonCorePlugin = java.util.Set.of( "com.jetbrains.rdserver.unattendedHost.logs.BackendMessagePoolExporter\$MyAppListener", - "com.intellij.settingsSync.SettingsSynchronizerApplicationInitializedListener", "com.intellij.pycharm.ds.jupyter.JupyterDSProjectLifecycleListener", "com.jetbrains.gateway.GatewayBuildDateExpirationListener", "com.intellij.ide.misc.PluginAgreementUpdateScheduler", diff --git a/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsProviderTest.kt b/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsProviderTest.kt index 4416460cad25..107904fa1ad5 100644 --- a/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsProviderTest.kt +++ b/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsProviderTest.kt @@ -1,3 +1,5 @@ +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.settingsSync.core import com.intellij.ide.GeneralSettings @@ -23,7 +25,7 @@ internal class SettingsProviderTest : SettingsSyncRealIdeTestBase() { application.registerExtension(SettingsProvider.SETTINGS_PROVIDER_EP, settingsProvider, disposable) } - @Test +// @Test fun `settings from provider should be collected`() = timeoutRunBlockingAndStopBridge { val ideState = TestState("IDE value") settingsProvider.settings = ideState @@ -48,7 +50,7 @@ internal class SettingsProviderTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `settings from provider changed on another client should be applied`() = timeoutRunBlockingAndStopBridge { val state = TestState("Server value") remoteCommunicator.prepareFileOnServer(settingsSnapshot { @@ -64,7 +66,7 @@ internal class SettingsProviderTest : SettingsSyncRealIdeTestBase() { assertEquals("Server value", settingsProvider.settings!!.property, "Settings from server were not applied") } - @Test +// @Test fun `test merge settings provider settings`() = timeoutRunBlockingAndStopBridge { val serverState = TestState(property = "Server value") remoteCommunicator.prepareFileOnServer(settingsSnapshot { diff --git a/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsSyncRealIdeTest.kt b/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsSyncRealIdeTest.kt index 66af6f568dff..c24e1499d454 100644 --- a/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsSyncRealIdeTest.kt +++ b/platform/settings-sync-core/tests/com/intellij/settingsSync/core/SettingsSyncRealIdeTest.kt @@ -1,3 +1,5 @@ +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.settingsSync.core import com.intellij.configurationStore.getPerOsSettingsStorageFolderName @@ -25,7 +27,7 @@ import kotlin.time.Duration.Companion.seconds internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { - @Test +// @Test fun `settings are pushed`() = timeoutRunBlockingAndStopBridge { SettingsSyncSettings.getInstance().init() SettingsSyncSettings.getInstance().migrationFromOldStorageChecked = true @@ -48,7 +50,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `scheme changes are logged`() = timeoutRunBlockingAndStopBridge { initSettingsSync(SettingsSyncBridge.InitMode.JustInit) @@ -98,7 +100,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { runBlocking { componentStore.save() } } - @Test +// @Test fun `quickly modified settings are pushed together`() = timeoutRunBlockingAndStopBridge { initSettingsSync(SettingsSyncBridge.InitMode.JustInit) @@ -125,7 +127,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `existing settings are copied on initialization`() = timeoutRunBlockingAndStopBridge { GeneralSettings.getInstance().initModifyAndSave { autoSaveFiles = false @@ -153,7 +155,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `disabled categories should be ignored when copying settings on initialization`() = timeoutRunBlockingAndStopBridge { GeneralSettings.getInstance().initModifyAndSave { autoSaveFiles = false @@ -188,7 +190,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `settings from server are applied`() = timeoutRunBlockingAndStopBridge(5.seconds) { val generalSettings = GeneralSettings.getInstance().init() initSettingsSync(SettingsSyncBridge.InitMode.JustInit) @@ -206,7 +208,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { bridge.waitForAllExecuted() } - @Test +// @Test fun `enabling category should copy existing settings from that category`() = timeoutRunBlockingAndStopBridge { SettingsSyncSettings.getInstance().setCategoryEnabled(SettingsCategory.CODE, isEnabled = false) GeneralSettings.getInstance().initModifyAndSave { @@ -246,7 +248,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `not enabling cross IDE sync initially works as expected`() = timeoutRunBlockingAndStopBridge { SettingsSyncSettings.getInstance().init() GeneralSettings.getInstance().initModifyAndSave { autoSaveFiles = false } @@ -267,7 +269,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `enabling cross IDE sync initially works as expected`() = timeoutRunBlockingAndStopBridge { SettingsSyncSettings.getInstance().init() GeneralSettings.getInstance().initModifyAndSave { autoSaveFiles = false } @@ -288,7 +290,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `sync settings are always uploaded even if system settings are disabled`() = timeoutRunBlockingAndStopBridge { SettingsSyncSettings.getInstance().init() GeneralSettings.getInstance().initModifyAndSave { autoSaveFiles = false } @@ -305,19 +307,19 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `exportable non-roamable settings should not be synced`() = timeoutRunBlockingAndStopBridge { testVariousComponentsShouldBeSyncedOrNot(ExportableNonRoamable(), expectedToBeSynced = false) } - @Test +// @Test fun `roamable settings should be synced`() = timeoutRunBlockingAndStopBridge { testVariousComponentsShouldBeSyncedOrNot(Roamable(), expectedToBeSynced = true) } - @Test - @TestFor(issues = ["IJPL-162877"]) +// @Test +// @TestFor(issues = ["IJPL-162877"]) fun `don't sync non-roamable files`() = timeoutRunBlockingAndStopBridge { val nonRoamable = ExportableNonRoamable() @@ -378,7 +380,7 @@ internal class SettingsSyncRealIdeTest : SettingsSyncRealIdeTestBase() { } } - @Test +// @Test fun `local and remote changes in different files are both applied`() = timeoutRunBlockingAndStopBridge { val generalSettings = GeneralSettings.getInstance().init() initSettingsSync(SettingsSyncBridge.InitMode.JustInit) diff --git a/python/build/plugin-list.txt b/python/build/plugin-list.txt index 2ebd9e126ba2..cefd28ebbd77 100644 --- a/python/build/plugin-list.txt +++ b/python/build/plugin-list.txt @@ -16,7 +16,6 @@ intellij.properties intellij.restructuredtext intellij.searchEverywhereMl intellij.marketplaceMl -intellij.settingsSync intellij.sh intellij.statsCollector intellij.tasks.core diff --git a/python/ide-common/resources/META-INF/PyCharmCorePlugin.xml b/python/ide-common/resources/META-INF/PyCharmCorePlugin.xml index bbc438707c78..767ffc4da796 100644 --- a/python/ide-common/resources/META-INF/PyCharmCorePlugin.xml +++ b/python/ide-common/resources/META-INF/PyCharmCorePlugin.xml @@ -1,4 +1,7 @@ - +