Move FUS components to the 'idea-core' module
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
// Note: along with adding a group to this enum you should also add its GROUP_ID to plugin.xml and get it whitelisted
|
||||
// (see https://confluence.jetbrains.com/display/FUS/IntelliJ+Reporting+API).
|
||||
enum class FUSEventGroups(groupIdSuffix: String) {
|
||||
GradleTarget("gradle.target"),
|
||||
MavenTarget("maven.target"),
|
||||
JPSTarget("jps.target"),
|
||||
Refactoring("ide.action.refactoring"),
|
||||
NewFileTemplate("ide.newFileTempl"),
|
||||
NPWizards("ide.npwizards"),
|
||||
DebugEval("ide.debugger.eval");
|
||||
|
||||
val GROUP_ID: String = "kotlin.$groupIdSuffix"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
import com.intellij.internal.statistic.eventLog.FeatureUsageData
|
||||
import com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger
|
||||
import org.jetbrains.kotlin.idea.KotlinPluginUtil
|
||||
|
||||
|
||||
open class KotlinFUSLogger {
|
||||
|
||||
companion object {
|
||||
private val context = FeatureUsageData().addData("plugin_version", KotlinPluginUtil.getPluginVersion())
|
||||
|
||||
fun log(group: FUSEventGroups, event: String) {
|
||||
FUCounterUsageLogger.getInstance().logEvent(group.GROUP_ID, event, context)
|
||||
}
|
||||
|
||||
fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) {
|
||||
val localContext = context.copy()
|
||||
for (entry in eventData) {
|
||||
localContext.addData(entry.key, entry.value)
|
||||
}
|
||||
FUCounterUsageLogger.getInstance().logEvent(group.GROUP_ID, event, localContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
open class KotlinFUSLogger {
|
||||
companion object {
|
||||
fun log(group: FUSEventGroups, event: String) {
|
||||
// Not whitelisted for 183
|
||||
}
|
||||
|
||||
fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) {
|
||||
// Not whitelisted for 183
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
open class KotlinFUSLogger {
|
||||
companion object {
|
||||
fun log(group: FUSEventGroups, event: String) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
|
||||
fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
open class KotlinFUSLogger {
|
||||
companion object {
|
||||
fun log(group: FUSEventGroups, event: String) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
|
||||
fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.statistics
|
||||
|
||||
open class KotlinFUSLogger {
|
||||
companion object {
|
||||
fun log(group: FUSEventGroups, event: String) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
|
||||
fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) {
|
||||
// Not whitelisted for AS
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user