trigger intentions, inspections and some of rename refactorings
This commit is contained in:
@@ -7,6 +7,10 @@ plugins {
|
||||
jvmTarget = "1.6"
|
||||
|
||||
dependencies {
|
||||
testCompile(intellijDep()) {
|
||||
includeJars("platform-api", rootProject = rootProject)
|
||||
isTransitive = false
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2010-2018 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.statistics
|
||||
|
||||
import com.intellij.internal.statistic.service.fus.collectors.ApplicationUsageTriggerCollector
|
||||
import javax.annotation.processing.AbstractProcessor
|
||||
import javax.annotation.processing.Processor
|
||||
import javax.annotation.processing.RoundEnvironment
|
||||
import javax.lang.model.element.TypeElement
|
||||
|
||||
open class KotlinStatisticsTrigger(private val groupIdSufix: String) : ApplicationUsageTriggerCollector() {
|
||||
override fun getGroupId() = "statistics.kotlin.$groupIdSufix"
|
||||
}
|
||||
|
||||
open class KotlinIdeStatisticsTrigger(groupIdSufix: String) : KotlinStatisticsTrigger("ide.$groupIdSufix")
|
||||
|
||||
open class KotlinGradlePluginStatisticsTrigger(groupIdSufix: String) : KotlinStatisticsTrigger("gradle.$groupIdSufix")
|
||||
|
||||
class KotlinVersionTrigger : KotlinGradlePluginStatisticsTrigger("kotlin_version")
|
||||
|
||||
class KotlinProjectLibraryUsageTrigger : KotlinGradlePluginStatisticsTrigger("library")
|
||||
|
||||
open class KotlinIdeActionTrigger(groupIdSufix: String? = null) : KotlinIdeStatisticsTrigger("action" + (groupIdSufix?.let { ".$it" } ?: ""))
|
||||
|
||||
class KotlinIdeUndoTrigger : KotlinIdeActionTrigger("undo")
|
||||
|
||||
class KotlinIdeQuickfixTrigger : KotlinIdeActionTrigger("quickfix")
|
||||
|
||||
class KotlinIdeRefactoringTrigger : KotlinIdeActionTrigger("refactoring")
|
||||
|
||||
class KotlinIdeIntentionTrigger : KotlinIdeActionTrigger("intention")
|
||||
|
||||
class KotlinIdeInspectionTrigger : KotlinIdeActionTrigger("inspection")
|
||||
|
||||
class KotlinIdeExceptionTrigger : KotlinIdeStatisticsTrigger("exception")
|
||||
Reference in New Issue
Block a user