mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
IJPL-155827 New Import Settings dialog doesn't suggest importing from VSCode when there recent projects and installed extentions there but settings are not changed
GitOrigin-RevId: 843fcf0ad9691a21ad2b30bf6bd602809bfd1bf5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4984da1c3d
commit
c9d0959e5e
@@ -9,6 +9,7 @@ import com.intellij.ide.startup.importSettings.models.Settings
|
||||
import com.intellij.ide.startup.importSettings.transfer.backend.providers.vscode.parsers.*
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.SystemInfoRt
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
@@ -41,7 +42,20 @@ class VSCodeSettingsProcessor(private val scope: CoroutineScope) {
|
||||
private val timeAfterLastModificationToConsiderTheInstanceRecent = Duration.ofHours(365 * 24) // one year
|
||||
}
|
||||
|
||||
fun willDetectAtLeastSomething(): Boolean = generalSettingsFile.exists()
|
||||
fun willDetectAtLeastSomething(): Boolean {
|
||||
if (generalSettingsFile.exists())
|
||||
return true
|
||||
|
||||
if (!pluginsDirectory.exists() || !pluginsDirectory.isDirectory)
|
||||
return false
|
||||
val pluginsDirEntries = pluginsDirectory.listFiles() ?: return false // no extensions and config file
|
||||
|
||||
for (pluginDirEntry in pluginsDirEntries) {
|
||||
if (pluginDirEntry.isDirectory)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun isInstanceRecentEnough(): Boolean {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user