diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java index 884e550e01d3..390f01baee8c 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java @@ -138,6 +138,17 @@ public abstract class ActionPlaces { return MAIN_MENU.equals(place) || ACTION_SEARCH.equals(place); } + private static final Set ourCommonPlaces = ContainerUtil.newHashSet( + UNKNOWN, MAIN_MENU, MAIN_TOOLBAR, EDITOR_TOOLBAR, EDITOR_TAB, COMMANDER_TOOLBAR, CONTEXT_TOOLBAR, TOOLWINDOW_TITLE, + PROJECT_VIEW_TOOLBAR, STATUS_BAR_PLACE, ACTION_SEARCH, TESTTREE_VIEW_TOOLBAR, TYPE_HIERARCHY_VIEW_TOOLBAR, + METHOD_HIERARCHY_VIEW_TOOLBAR, CALL_HIERARCHY_VIEW_TOOLBAR, RUNNER_TOOLBAR, DEBUGGER_TOOLBAR, USAGE_VIEW_TOOLBAR, + STRUCTURE_VIEW_TOOLBAR, NAVIGATION_BAR_TOOLBAR, TODO_VIEW_TOOLBAR, COMPILER_MESSAGES_TOOLBAR, + ANT_MESSAGES_TOOLBAR, ANT_EXPLORER_TOOLBAR, CODE_INSPECTION, JAVADOC_TOOLBAR, JAVADOC_INPLACE_SETTINGS, + FILEHISTORY_VIEW_TOOLBAR, RUN_CONFIGURATIONS_COMBOBOX, WELCOME_SCREEN, CHANGES_VIEW_TOOLBAR, DATABASE_VIEW_TOOLBAR, + ACTION_PLACE_QUICK_LIST_POPUP_ACTION, PHING_EXPLORER_TOOLBAR, DOCK_MENU, PHING_MESSAGES_TOOLBAR, DIFF_TOOLBAR, + ANALYZE_STACKTRACE_PANEL_TOOLBAR, TOUCHBAR_GENERAL + ); + private static final Set ourPopupPlaces = ContainerUtil.newHashSet( POPUP, EDITOR_POPUP, EDITOR_TAB_POPUP, COMMANDER_POPUP, PROJECT_VIEW_POPUP, FAVORITES_VIEW_POPUP, SCOPE_VIEW_POPUP, TESTTREE_VIEW_POPUP, TESTSTATISTICS_VIEW_POPUP, TYPE_HIERARCHY_VIEW_POPUP, @@ -156,6 +167,10 @@ public abstract class ActionPlaces { return ourPopupPlaces.contains(place) || place.startsWith(POPUP_PREFIX); } + public static boolean isCommonPlace(@NotNull String place) { + return ourPopupPlaces.contains(place) || ourCommonPlaces.contains(place); + } + @NotNull public static String getActionGroupPopupPlace(@Nullable String actionId) { return actionId == null ? POPUP : POPUP_PREFIX + actionId; diff --git a/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/ActionsCollectorImpl.java b/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/ActionsCollectorImpl.java index aaf748b3649d..6f9d36bacf31 100644 --- a/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/ActionsCollectorImpl.java +++ b/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/ActionsCollectorImpl.java @@ -34,7 +34,7 @@ import java.util.Set; value = UsageStatisticsPersistenceComponent.USAGE_STATISTICS_XML, roamingType = RoamingType.DISABLED, deprecated = true) ) public class ActionsCollectorImpl extends ActionsCollector implements PersistentStateComponent { - private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("actions", 2); + private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("actions", 3); private static final String DEFAULT_ID = "third.party"; private static final Set ourCustomActionWhitelist = ContainerUtil.newHashSet( @@ -58,22 +58,15 @@ public class ActionsCollectorImpl extends ActionsCollector implements Persistent public void record(@Nullable AnAction action, @Nullable AnActionEvent event) { if (action == null) return; - boolean isContextMenu = event != null && event.isFromContextMenu(); - final String place = event != null ? event.getPlace() : ""; - final PluginInfo info = PluginInfoDetectorKt.getPluginInfo(action.getClass()); final FeatureUsageDataBuilder data = new FeatureUsageDataBuilder(). addFeatureContext(FUSUsageContext.OS_CONTEXT). - addPluginInfo(info). - addData("context_menu", isContextMenu); + addPluginInfo(info); if (event != null) { - data.addInputEvent(event); - } - - final boolean isDevelopedByJB = info.isDevelopedByJetBrains(); - if (isContextMenu && isDevelopedByJB) { - data.addPlace(place); + data.addInputEvent(event). + addPlace(event.getPlace()). + addData("context_menu", event.isFromContextMenu()); } FUSCounterUsageLogger.logEvent(GROUP, toReportedId(info, action), data); diff --git a/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/ui/persistence/ToolbarClicksCollector.java b/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/ui/persistence/ToolbarClicksCollector.java index 292cd35966ef..eac9d5fb45b2 100644 --- a/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/ui/persistence/ToolbarClicksCollector.java +++ b/platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/ui/persistence/ToolbarClicksCollector.java @@ -30,7 +30,7 @@ import java.util.Map; } ) public class ToolbarClicksCollector implements PersistentStateComponent { - private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("toolbar", 2); + private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("toolbar", 3); public final static class ClicksState { @Tag("counts") @@ -51,11 +51,8 @@ public class ToolbarClicksCollector implements PersistentStateComponent