diff options
author | Ilya Kirillov <ilya.kirillov@jetbrains.com> | 2021-01-04 17:43:10 +0100 |
---|---|---|
committer | kotlin-ide-monorepo-bot <kotlin-ide-monorepo-bot-no-reply@jetbrains.com> | 2021-01-04 16:45:19 +0000 |
commit | a2876e61105b6f64966fb234106758bcac10d112 (patch) | |
tree | a749caf98bd9b63feca62fee05dbefb499727f15 /idea | |
parent | 77232a0d29f85d5577111ac346ceb754235087c8 (diff) | |
download | intellij-kotlin-a2876e61105b6f64966fb234106758bcac10d112.tar.gz |
Wizard: do not use spaces in logger module type
GitOrigin-RevId: 4b74702e8643cea289bfdcdf24461e5cabfe7b52
Diffstat (limited to 'idea')
-rw-r--r-- | idea/src/org/jetbrains/kotlin/idea/projectWizard/WizardStatsService.kt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/idea/src/org/jetbrains/kotlin/idea/projectWizard/WizardStatsService.kt b/idea/src/org/jetbrains/kotlin/idea/projectWizard/WizardStatsService.kt index df4afe946cf1..1bac034d1254 100644 --- a/idea/src/org/jetbrains/kotlin/idea/projectWizard/WizardStatsService.kt +++ b/idea/src/org/jetbrains/kotlin/idea/projectWizard/WizardStatsService.kt @@ -15,7 +15,6 @@ import com.intellij.openapi.project.Project import org.jetbrains.kotlin.idea.KotlinPluginUtil import kotlin.math.abs import kotlin.random.Random -import kotlin.random.nextUInt interface WizardStats { fun toPairs(): ArrayList<EventPair<*>> @@ -27,7 +26,7 @@ class WizardStatsService : CounterUsagesCollector() { companion object { // Collector ID - private val GROUP = EventLogGroup("kotlin.ide.new.project", 5) + private val GROUP = EventLogGroup("kotlin.ide.new.project", 6) // Whitelisted values for the events fields private val allowedProjectTemplates = listOf( // Modules @@ -206,9 +205,9 @@ class WizardStatsService : CounterUsagesCollector() { "jvmTarget", "androidTarget", "multiplatform", - "JVM Module", + "JVM_Module", "android", - "IOS Module", + "IOS_Module", "jsBrowserSinglePlatform", "jsNodeSinglePlatform", ) @@ -362,7 +361,7 @@ class WizardStatsService : CounterUsagesCollector() { ) { moduleCreatedEvent.log( sessionIdField with session.id, - moduleTypeField with moduleType, + moduleTypeField with moduleType.withSpacesRemoved(), pluginInfoField, ) } @@ -373,7 +372,7 @@ class WizardStatsService : CounterUsagesCollector() { ) { moduleRemovedEvent.log( sessionIdField with session.id, - moduleTypeField with moduleType, + moduleTypeField with moduleType.withSpacesRemoved(), pluginInfoField, ) } @@ -457,6 +456,8 @@ class WizardStatsService : CounterUsagesCollector() { } } +private fun String.withSpacesRemoved(): String = + replace(' ', '_') private sealed class SettingIdWithPossibleValues { abstract val id: String |