From 165f32ec13d234162a2bd58dfe35fe235902f3bd Mon Sep 17 00:00:00 2001 From: Olga Strizhenko Date: Wed, 10 Jun 2020 13:47:23 +0200 Subject: [PATCH] IDEA-CR-63534: FUS-724 Spellchecker: gather statistics about user interaction with "Accepted words" panel - provide project GitOrigin-RevId: 8faedf09676ba9cb3bf449cc8908924f41c37f8c --- .../spellchecker/settings/SpellCheckerSettingsPane.java | 4 ++-- .../statistics/SpellcheckerActionStatistics.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spellchecker/src/com/intellij/spellchecker/settings/SpellCheckerSettingsPane.java b/spellchecker/src/com/intellij/spellchecker/settings/SpellCheckerSettingsPane.java index e89795e124c5..b82e4b2d31a1 100644 --- a/spellchecker/src/com/intellij/spellchecker/settings/SpellCheckerSettingsPane.java +++ b/spellchecker/src/com/intellij/spellchecker/settings/SpellCheckerSettingsPane.java @@ -221,14 +221,14 @@ public class SpellCheckerSettingsPane implements Disposable { @Override protected void customizeDecorator(ToolbarDecorator decorator) { decorator.setRemoveAction((button) -> { - SpellcheckerActionStatistics.reportAction("remove.from.accepted.words.ui"); + SpellcheckerActionStatistics.reportAction("remove.from.accepted.words.ui", manager.getProject()); ListUtil.removeSelectedItems(myList); }); } @Override protected String findItemToAdd() { - SpellcheckerActionStatistics.reportAction("add.to.accepted.words.ui"); + SpellcheckerActionStatistics.reportAction("add.to.accepted.words.ui", manager.getProject()); String word = Messages.showInputDialog(SpellCheckerBundle.message("enter.simple.word"), SpellCheckerBundle.message("add.new.word"), null); if (word == null) { diff --git a/spellchecker/src/com/intellij/spellchecker/statistics/SpellcheckerActionStatistics.java b/spellchecker/src/com/intellij/spellchecker/statistics/SpellcheckerActionStatistics.java index 3d21a1e4e0a9..798ca1128b38 100644 --- a/spellchecker/src/com/intellij/spellchecker/statistics/SpellcheckerActionStatistics.java +++ b/spellchecker/src/com/intellij/spellchecker/statistics/SpellcheckerActionStatistics.java @@ -2,11 +2,12 @@ package com.intellij.spellchecker.statistics; import com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger; +import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; public class SpellcheckerActionStatistics { - public static void reportAction(@NotNull String action) { - FUCounterUsageLogger.getInstance().logEvent("spellchecker.events", action); + public static void reportAction(@NotNull String action, @NotNull Project project) { + FUCounterUsageLogger.getInstance().logEvent(project, "spellchecker.events", action); } }