IDEA-CR-63534: FUS-724 Spellchecker: gather statistics about user interaction with "Accepted words" panel - provide project

GitOrigin-RevId: 8faedf09676ba9cb3bf449cc8908924f41c37f8c
This commit is contained in:
Olga Strizhenko
2020-06-10 18:05:18 +03:00
committed by intellij-monorepo-bot
parent f322a6a9e4
commit 165f32ec13
2 changed files with 5 additions and 4 deletions
@@ -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) {
@@ -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);
}
}