mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
FUS: extract statistics actions into separate module (IDEA-229155)
GitOrigin-RevId: 50141826313f3d2e8cbe899c131b81153b1c4b9d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
63e3e64be1
commit
2eef6434b6
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -659,6 +659,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/service-container/intellij.platform.serviceContainer.iml" filepath="$PROJECT_DIR$/platform/service-container/intellij.platform.serviceContainer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/smRunner/intellij.platform.smRunner.iml" filepath="$PROJECT_DIR$/platform/smRunner/intellij.platform.smRunner.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/statistics/intellij.platform.statistics.iml" filepath="$PROJECT_DIR$/platform/statistics/intellij.platform.statistics.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/statistics/devkit/intellij.platform.statistics.devkit.iml" filepath="$PROJECT_DIR$/platform/statistics/devkit/intellij.platform.statistics.devkit.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/structuralsearch/intellij.platform.structuralSearch.iml" filepath="$PROJECT_DIR$/platform/structuralsearch/intellij.platform.structuralSearch.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/structuralsearch/intellij.platform.structuralSearch.tests.iml" filepath="$PROJECT_DIR$/platform/structuralsearch/intellij.platform.structuralSearch.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/platform/structure-view-impl/intellij.platform.structureView.impl.iml" filepath="$PROJECT_DIR$/platform/structure-view-impl/intellij.platform.structureView.impl.iml" />
|
||||
|
||||
@@ -146,6 +146,7 @@ class DistributionJARsBuilder {
|
||||
withModule("intellij.spellchecker")
|
||||
withModule("intellij.platform.images")
|
||||
withModule("intellij.platform.statistics")
|
||||
withModule("intellij.platform.statistics.devkit")
|
||||
|
||||
withModule("intellij.relaxng", "intellij-xml.jar")
|
||||
withModule("intellij.xml.analysis.impl", "intellij-xml.jar")
|
||||
|
||||
@@ -38,5 +38,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||
<orderEntry type="module" module-name="intellij.platform.serviceContainer" />
|
||||
<orderEntry type="module" module-name="intellij.platform.workspaceModel.ide" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.platform.statistics.devkit" scope="RUNTIME" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -113,4 +113,5 @@
|
||||
<xi:include href="built-in-server.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<xi:include href="/idea/ExternalSystemActions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<xi:include href="/componentSets/ExternalSystemComponents.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<xi:include href="StatisticsEventLog.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<idea-plugin>
|
||||
<actions>
|
||||
<group id="FeatureUsage.Internal" popup="true" compact="true" text="Feature Usages Statistics">
|
||||
<action internal="true" id="SendEventLogStatistics" class="com.intellij.internal.statistic.actions.SendEventLogAction"
|
||||
text="Send Feature Usage Event Log"
|
||||
description="Sends event log files to qa server"/>
|
||||
<action internal="true" id="CleanupEventLogStatistics" class="com.intellij.internal.statistic.actions.CleanupEventLogAction"
|
||||
text="Clean Up Event Log"
|
||||
description="Removes all not send event log files"/>
|
||||
<action internal="true" id="OpenEventLogFileAction" class="com.intellij.internal.statistic.actions.OpenEventLogFileAction"
|
||||
text="Open Event Log in Editor"
|
||||
description="Opens active event log file in IDE"/>
|
||||
<action internal="true" id="AddTestGroupToLocalWhitelistAction"
|
||||
class="com.intellij.internal.statistic.actions.AddTestGroupToLocalWhitelistAction"
|
||||
text="Add Test Group to Local Whitelist"
|
||||
description="Allows all data from the group. Use it to test new collector locally."/>
|
||||
<action internal="true" id="RecordStateCollectors"
|
||||
class="com.intellij.internal.statistic.actions.RecordStateStatisticsEventLogAction"
|
||||
text="Record State Collectors to Event Log"
|
||||
description="Invokes all state collectors and records result to event log"/>
|
||||
<action internal="true" id="CleanupLocalWhitelistAction"
|
||||
class="com.intellij.internal.statistic.actions.CleanupLocalWhitelistAction"
|
||||
text="Clean Up Local Whitelist"
|
||||
description="Removes all groups from the local whitelist"/>
|
||||
<action internal="true" id="ShowStatisticsEventLogAction"
|
||||
class="com.intellij.internal.statistic.actions.ShowStatisticsEventLogAction"
|
||||
text="Show Statistics Event Log"
|
||||
description="Opens toolwindow with feature usage statistics event log"/>
|
||||
<action internal="true" id="ConfigureWhitelistAction" class="com.intellij.internal.statistic.actions.ConfigureWhitelistAction"
|
||||
text="Configure Whitelist"
|
||||
description="Configure whitelist from the custom folder"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
<!-- Internal.PMM-->
|
||||
</group>
|
||||
</actions>
|
||||
</idea-plugin>
|
||||
@@ -1164,37 +1164,6 @@
|
||||
<separator/>
|
||||
<reference ref="MaintenanceGroup"/>
|
||||
|
||||
<group id="FeatureUsage.Internal" popup="true" compact="true" text="Feature Usages Statistics">
|
||||
<action internal="true" id="SendEventLogStatistics" class="com.intellij.internal.statistic.actions.SendEventLogAction"
|
||||
text="Send Feature Usage Event Log"
|
||||
description="Sends event log files to qa server"/>
|
||||
<action internal="true" id="CleanupEventLogStatistics" class="com.intellij.internal.statistic.actions.CleanupEventLogAction"
|
||||
text="Clean Up Event Log"
|
||||
description="Removes all not send event log files"/>
|
||||
<action internal="true" id="OpenEventLogFileAction" class="com.intellij.internal.statistic.actions.OpenEventLogFileAction"
|
||||
text="Open Event Log in Editor"
|
||||
description="Opens active event log file in IDE"/>
|
||||
<action internal="true" id="AddTestGroupToLocalWhitelistAction"
|
||||
class="com.intellij.internal.statistic.actions.AddTestGroupToLocalWhitelistAction"
|
||||
text="Add Test Group to Local Whitelist"
|
||||
description="Allows all data from the group. Use it to test new collector locally."/>
|
||||
<action internal="true" id="RecordStateCollectors"
|
||||
class="com.intellij.internal.statistic.actions.RecordStateStatisticsEventLogAction"
|
||||
text="Record State Collectors to Event Log"
|
||||
description="Invokes all state collectors and records result to event log"/>
|
||||
<action internal="true" id="CleanupLocalWhitelistAction"
|
||||
class="com.intellij.internal.statistic.actions.CleanupLocalWhitelistAction"
|
||||
text="Clean Up Local Whitelist"
|
||||
description="Removes all groups from the local whitelist"/>
|
||||
<action internal="true" id="ShowStatisticsEventLogAction"
|
||||
class="com.intellij.internal.statistic.actions.ShowStatisticsEventLogAction"
|
||||
text="Show Statistics Event Log"
|
||||
description="Opens toolwindow with feature usage statistics event log"/>
|
||||
<action internal="true" id="ConfigureWhitelistAction" class="com.intellij.internal.statistic.actions.ConfigureWhitelistAction"
|
||||
text="Configure Whitelist"
|
||||
description="Configure whitelist from the custom folder"/>
|
||||
</group>
|
||||
|
||||
<group id="Internal.PMM" popup="true" text="PMM Utils">
|
||||
<action id="ApplyFixedWindowSize" internal="true" class="com.intellij.internal.inspector.ApplyWindowSizeAction"
|
||||
text="Apply Specific Size"/>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/testSrc" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kotlin-stdlib-jdk8" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
|
||||
<orderEntry type="library" name="gson" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -26,7 +26,6 @@ import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.ui.AppUIUtil;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -3,7 +3,10 @@ package com.intellij.internal.statistic.actions;
|
||||
|
||||
import com.intellij.ide.scratch.RootType;
|
||||
import com.intellij.ide.scratch.ScratchFileService;
|
||||
import com.intellij.internal.statistic.eventLog.*;
|
||||
import com.intellij.internal.statistic.eventLog.LogEventFilter;
|
||||
import com.intellij.internal.statistic.eventLog.LogEventRecordRequest;
|
||||
import com.intellij.internal.statistic.eventLog.LogEventSerializer;
|
||||
import com.intellij.internal.statistic.eventLog.LogEventWhitelistFilter;
|
||||
import com.intellij.internal.statistic.service.fus.FUSWhitelist;
|
||||
import com.intellij.internal.statistic.service.fus.FUStatisticsWhiteListGroupsService;
|
||||
import com.intellij.lang.Language;
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2019 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.
|
||||
package com.intellij.internal.statistics.action
|
||||
package com.intellij.internal.statistic.actions
|
||||
|
||||
import com.intellij.internal.statistic.actions.CleanupLocalWhitelistAction
|
||||
import com.intellij.internal.statistic.eventLog.whitelist.WhitelistTestGroupStorage
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
@@ -6,12 +6,13 @@ import com.intellij.internal.statistic.actions.StatisticsEventLogToolWindow.Comp
|
||||
import com.intellij.internal.statistic.eventLog.LogEvent
|
||||
import com.intellij.internal.statistic.eventLog.LogEventAction
|
||||
import com.intellij.internal.statistic.eventLog.validator.ValidationResultType.*
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.intellij.util.text.DateFormatUtil
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class StatisticsEventLogToolWindowTest {
|
||||
class StatisticsEventLogToolWindowTest : BasePlatformTestCase() {
|
||||
private val eventId = "third.party"
|
||||
private val eventTime = 1564643114456
|
||||
|
||||
Reference in New Issue
Block a user