User: rednesto Date: 02 Jul 23 22:05 Revision: 92105c61d36a2e00b47dca661c42d8775127a1a2 Summary: Merge branch '2022.3' into 2023.1 TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=8568&personal=false Index: gradle.properties =================================================================== --- gradle.properties (revision c41d4122c4576c68df3b9404a096499a26890f14) +++ gradle.properties (revision 92105c61d36a2e00b47dca661c42d8775127a1a2) @@ -24,7 +24,7 @@ ideaVersion = 2023.1 ideaVersionName = 2023.1 -coreVersion = 1.6.6 +coreVersion = 1.6.7 downloadIdeaSources = true pluginTomlVersion = 231.8109.1 Index: src/main/kotlin/insight/ColorUtil.kt =================================================================== --- src/main/kotlin/insight/ColorUtil.kt (revision c41d4122c4576c68df3b9404a096499a26890f14) +++ src/main/kotlin/insight/ColorUtil.kt (revision 92105c61d36a2e00b47dca661c42d8775127a1a2) @@ -49,10 +49,12 @@ import org.jetbrains.uast.resolveToUElement fun UIdentifier.findColor(function: (Map, Map.Entry) -> T): T? { + return runCatchingKtIdeaExceptions { - val parent = this.uastParent - val expression = parent as? UReferenceExpression ?: return null + val parent = this.uastParent + val expression = parent as? UReferenceExpression ?: return null - return findColorFromExpression(expression, function) + findColorFromExpression(expression, function) -} + } +} private fun findColorFromExpression( expression: UReferenceExpression, Index: src/main/kotlin/util/utils.kt =================================================================== --- src/main/kotlin/util/utils.kt (revision c41d4122c4576c68df3b9404a096499a26890f14) +++ src/main/kotlin/util/utils.kt (revision 92105c61d36a2e00b47dca661c42d8775127a1a2) @@ -369,8 +369,12 @@ action() } catch (e: Exception) { if (e.javaClass.name == "org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException") { + loggerForTopLevel().info("Caught Kotlin plugin exception", e) null } else { throw e } } + +fun withSuppressed(original: T?, other: T): T = + original?.apply { addSuppressed(other) } ?: other