Not throw exception when cidr has been registered already
This is to avoid failures from some Android Studio tests depending on cidr.
This commit is contained in:
committed by
Nikolay Krasko
parent
9f6e88d571
commit
d33d1913cb
@@ -10,7 +10,6 @@ package org.jetbrains.kotlin.idea
|
|||||||
import com.intellij.featureStatistics.FeatureStatisticsBundleProvider
|
import com.intellij.featureStatistics.FeatureStatisticsBundleProvider
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
import com.intellij.openapi.extensions.Extensions
|
import com.intellij.openapi.extensions.Extensions
|
||||||
import java.lang.IllegalStateException
|
|
||||||
|
|
||||||
private const val CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME = "com.jetbrains.cidr.lang.OCFeatureStatisticsBundleProvider"
|
private const val CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME = "com.jetbrains.cidr.lang.OCFeatureStatisticsBundleProvider"
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ fun registerAdditionalResourceBundleInTests() {
|
|||||||
provider.javaClass.name == CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME
|
provider.javaClass.name == CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME
|
||||||
}
|
}
|
||||||
if (isAlreadyRegistered) {
|
if (isAlreadyRegistered) {
|
||||||
throw IllegalStateException("Remove this registration for the current platform: bundle is already registered.")
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val cidrFSBundleProviderClass = try {
|
val cidrFSBundleProviderClass = try {
|
||||||
|
|||||||
Reference in New Issue
Block a user