mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IJPL-157080 add the ability to perform migration from another IDE
GitOrigin-RevId: e77464621f6a205ad1e2f3a5444afb1e1926505d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
72dbe58a49
commit
8f614c8382
@@ -47,14 +47,14 @@ internal fun enableL10nIfPluginInstalled(previousVersion: String?, oldPluginsDir
|
||||
* @param descriptor the descriptor of the plugin to be checked
|
||||
* @return `true` if the plugin is a localization plugin; `false` otherwise
|
||||
*/
|
||||
fun isLocalizationPlugin(descriptor: IdeaPluginDescriptor): Boolean {
|
||||
private fun isLocalizationPlugin(descriptor: IdeaPluginDescriptor): Boolean {
|
||||
if (descriptor !is IdeaPluginDescriptorImpl) return false
|
||||
val extensionPoints = descriptor.epNameToExtensions
|
||||
val epName = "com.intellij.languageBundle"
|
||||
return extensionPoints.containsKey(epName)
|
||||
}
|
||||
|
||||
fun getLanguageTagFromDescriptor(descriptor: IdeaPluginDescriptor): String? {
|
||||
private fun getLanguageTagFromDescriptor(descriptor: IdeaPluginDescriptor): String? {
|
||||
if (descriptor !is IdeaPluginDescriptorImpl) return null
|
||||
val extensionPoints = descriptor.epNameToExtensions
|
||||
val epName = "com.intellij.languageBundle"
|
||||
|
||||
@@ -453,6 +453,8 @@ class JbImportServiceImpl(private val coroutineScope: CoroutineScope) : JbServic
|
||||
ImportSettingsEventsCollector.jbPluginsImportTimeSpent(it)
|
||||
}
|
||||
}
|
||||
LOG.info("Started localization migration...")
|
||||
importer.migrateLocalization()
|
||||
if (progressIndicator.isCanceled()) {
|
||||
LOG.info("Import cancelled after importing the plugins. ${if (restartRequired) "Will now restart." else ""}")
|
||||
return restartRequired
|
||||
|
||||
@@ -500,13 +500,17 @@ class JbSettingsImporter(private val configDirPath: Path,
|
||||
ConfigImportHelper.updateVMOptions(PathManager.getConfigDir(), LOG)
|
||||
}
|
||||
CustomConfigMigrationOption.MigrateFromCustomPlace(configDirPath).writeConfigMarkerFile(PathManager.getConfigDir())
|
||||
ConfigImportHelper.migrateLocalization(configDirPath, pluginsPath)
|
||||
migrateLocalization()
|
||||
(System.currentTimeMillis() - startTime).let {
|
||||
LOG.info("Raw import finished in $it ms.")
|
||||
ImportSettingsEventsCollector.jbTotalImportTimeSpent(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun migrateLocalization() {
|
||||
ConfigImportHelper.migrateLocalization(configDirPath, pluginsPath)
|
||||
}
|
||||
|
||||
internal class ImportStreamProvider(private val configDirPath: Path) : StreamProvider {
|
||||
override val isExclusive = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user