File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,9 +33,13 @@ internal object NoOpReporter : AnalyticsReporter() {
3333 override fun process (data : AnalyticsData ) = Unit
3434}
3535
36- abstract class AnalyticsData {
36+ abstract class AnalyticsData ( type : String ) {
3737 val data = mutableMapOf<String , Any >()
3838
39+ init {
40+ add(" type" , type)
41+ }
42+
3943 companion object {
4044 @JvmStatic
4145 fun forAction (action : AnAction , event : AnActionEvent ): ActionData = ActionData (
@@ -61,7 +65,14 @@ abstract class AnalyticsData {
6165 open fun reportTo (reporter : AnalyticsReporter ) = reporter.process(this )
6266}
6367
64- class ActionData (private val id : String? , private val place : String ) : AnalyticsData() {
68+ /* *
69+ * Data describing an IntelliJ [com.intellij.openapi.actionSystem.AnAction] for analytics reporting.
70+ *
71+ * @param id The unique identifier of the action, typically defined in `plugin.xml`.
72+ * @param place The UI location where the action was invoked (e.g., "MainMenu", "Toolbar").
73+ * @see <a href="https://plugins.jetbrains.com/docs/intellij/basic-action-system.html">IntelliJ Action System</a>
74+ */
75+ class ActionData (private val id : String? , private val place : String ) : AnalyticsData(" action" ) {
6576
6677 init {
6778 id?.let { add(" id" , it) }
You can’t perform that action at this time.
0 commit comments