mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Log clicks on folding icons in the editor to FUS (FUS-1152)
GitOrigin-RevId: b3a58cd495a982864c768f42f93b8cc3a8499876
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d8e42436ff
commit
e531adb8d6
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.editor.impl;
|
||||
|
||||
import com.intellij.application.options.EditorFontsConstants;
|
||||
@@ -8,6 +8,7 @@ import com.intellij.ide.dnd.DnDManager;
|
||||
import com.intellij.ide.lightEdit.LightEdit;
|
||||
import com.intellij.ide.lightEdit.LightEditCompatible;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.internal.statistic.service.fus.collectors.UIEventLogger;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.ex.ActionManagerEx;
|
||||
@@ -3957,6 +3958,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
final FoldRegion range = myGutterComponent.findFoldingAnchorAt(x, y);
|
||||
if (range != null) {
|
||||
final boolean expansion = !range.isExpanded();
|
||||
UIEventLogger.EditorFoldingIconClicked.log(expansion, e.isAltDown());
|
||||
|
||||
int scrollShift = expansion ? 0 : visualLineToY(yToVisualLine(y)) - getScrollingModel().getVerticalScrollOffset();
|
||||
getFoldingModel().runBatchFoldingOperation(() -> {
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.internal.statistic.service.fus.collectors
|
||||
|
||||
import com.intellij.internal.statistic.eventLog.EventLogGroup
|
||||
@@ -7,7 +7,7 @@ import com.intellij.internal.statistic.eventLog.events.EventFields
|
||||
|
||||
class UIEventLogger : CounterUsagesCollector() {
|
||||
companion object {
|
||||
private val group = EventLogGroup("ui.event", 11)
|
||||
private val group = EventLogGroup("ui.event", 12)
|
||||
|
||||
@JvmField val NavBarShowPopup = group.registerEvent("NavBarShowPopup")
|
||||
@JvmField val NavBarNavigate = group.registerEvent("NavBarNavigate")
|
||||
@@ -33,6 +33,7 @@ class UIEventLogger : CounterUsagesCollector() {
|
||||
@JvmField val ToolWindowsWidgetPopupClicked = group.registerEvent("ToolWindowsWidgetPopupClicked")
|
||||
@JvmField val ImplementationViewComboBoxSelected = group.registerEvent("ImplementationViewComboBoxSelected")
|
||||
@JvmField val ImplementationViewToolWindowOpened = group.registerEvent("ImplementationViewToolWindowOpened")
|
||||
@JvmField val EditorFoldingIconClicked = group.registerEvent("EditorFoldingIconClicked", EventFields.Boolean("expand"), EventFields.Boolean("recursive"))
|
||||
}
|
||||
|
||||
override fun getGroup(): EventLogGroup = Companion.group
|
||||
|
||||
Reference in New Issue
Block a user