@Override
    public void beforeEditorTyping(char c, @NotNull DataContext dataContext) {
      if (!StatisticsUploadAssistant.isCollectAllowedOrForced()) return;

      EventRateThrottleResult result = ourThrottle.tryPass(System.currentTimeMillis());
      Project project = CommonDataKeys.PROJECT.getData(dataContext);
      if (result == EventRateThrottleResult.ACCEPT) {
        ArrayList<EventPair<?>> pairs = new ArrayList<>(3);

        Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
        if (editor != null) {
          try {
            pairs.add(EDITOR_KIND.with(editor.getEditorKind()));
          } catch (UnsupportedOperationException e) {
            // See com.intellij.openapi.editor.impl.ImaginaryEditor
          }
        }

        ToolWindow toolWindow = PlatformDataKeys.TOOL_WINDOW.getData(dataContext);
        if (toolWindow != null) {
          pairs.add(TOOL_WINDOW.with(toolWindow.getId()));
        }

        Language fileLanguage = DataContextUtils.getFileTypeLanguageByEditor(dataContext);
        if (fileLanguage != null) {
          pairs.add(EventFields.Language.with(fileLanguage));
        }

        TYPED.log(project, pairs);
      }
      else if (result == EventRateThrottleResult.DENY_AND_REPORT) {
        TOO_MANY_EVENTS.log(project);
      }
    }
@Override
    public void beforeEditorTyping(char c, @NotNull DataContext dataContext)