mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[feedback] IJPL-177421 Permanent CSAT survey in IDEs
Include Host IDE information to system info of the survey (cherry picked from commit 3822a535fffbd494de578f53e14f5a50f143b36f) (cherry picked from commit d511b0149b34ca002bb5b6d2502f9ee08db85531) IJ-MR-155667 GitOrigin-RevId: 58eab78bf22e1ab08b41e7cc3625d3069d4f740d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
03c0b5d05e
commit
0a6225844d
@@ -25,6 +25,7 @@ dialog.feedback.system.info.panel.disabled.plugins.empty=None
|
||||
dialog.feedback.system.info.panel.nonbundled.plugins=Non-bundled plugins:
|
||||
dialog.feedback.system.info.panel.nonbundled.plugins.empty=None
|
||||
dialog.feedback.system.info.panel.remote.dev.host=Remote development host:
|
||||
dialog.feedback.system.info.panel.app.version.host=\nHost IDE: {0}
|
||||
|
||||
dialog.feedback.ok.label=Send Feedback
|
||||
dialog.feedback.cancel.label=Cancel
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.feedback.dialog
|
||||
|
||||
import com.intellij.frontend.HostIdeInfoService
|
||||
import com.intellij.ide.nls.NlsMessages
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptor
|
||||
import com.intellij.ide.plugins.PluginManagerCore
|
||||
@@ -10,6 +11,7 @@ import com.intellij.internal.statistic.utils.platformPlugin
|
||||
import com.intellij.openapi.application.ApplicationInfo
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
@@ -65,6 +67,7 @@ data class CommonFeedbackSystemData(
|
||||
private fun getOsVersion() = SystemInfo.OS_NAME + " " + SystemInfo.OS_VERSION
|
||||
private fun getMemorySize() = Runtime.getRuntime().maxMemory() / FileUtilRt.MEGABYTE
|
||||
private fun getCoresNumber() = Runtime.getRuntime().availableProcessors()
|
||||
|
||||
private fun getAppVersionWithBuild(): String {
|
||||
val appInfo = ApplicationInfo.getInstance()
|
||||
|
||||
@@ -74,7 +77,6 @@ data class CommonFeedbackSystemData(
|
||||
appVersion += " ($edition)"
|
||||
}
|
||||
|
||||
// todo remove dev host info
|
||||
val appBuild = appInfo.build
|
||||
appVersion += CommonFeedbackBundle.message("dialog.feedback.system.info.panel.app.version.build", appBuild.asString())
|
||||
val timestamp: Date = appInfo.buildDate.time
|
||||
@@ -87,6 +89,14 @@ data class CommonFeedbackSystemData(
|
||||
appVersion += CommonFeedbackBundle.message("dialog.feedback.system.info.panel.app.version.build.date",
|
||||
NlsMessages.formatDateLong(timestamp))
|
||||
}
|
||||
|
||||
if (appInfo.build.productCode == "JBC") {
|
||||
val hostInfo = service<HostIdeInfoService>().getHostInfo()
|
||||
if (hostInfo != null) {
|
||||
appVersion += CommonFeedbackBundle.message("dialog.feedback.system.info.panel.app.version.host", hostInfo.productCode)
|
||||
}
|
||||
}
|
||||
|
||||
return appVersion
|
||||
}
|
||||
|
||||
@@ -100,11 +110,17 @@ data class CommonFeedbackSystemData(
|
||||
|
||||
private fun getRuntimeVersion() = SystemInfo.JAVA_RUNTIME_VERSION + SystemInfo.OS_ARCH
|
||||
private fun getIsInternalMode(): Boolean = ApplicationManager.getApplication().isInternal
|
||||
private fun getRegistryKeys(): List<String> = Registry.getAll().filter { value: RegistryValue ->
|
||||
val pluginId: String? = value.pluginId
|
||||
val pluginInfo = if (pluginId != null) getPluginInfoById(PluginId.getId(pluginId)) else platformPlugin
|
||||
value.isChangedFromDefault() && pluginInfo.isSafeToReport()
|
||||
}.map { v: RegistryValue -> v.key + "=" + v.asString() }.toList()
|
||||
|
||||
private fun getRegistryKeys(): List<String> {
|
||||
return Registry.getAll()
|
||||
.filter { value: RegistryValue ->
|
||||
val pluginId: String? = value.pluginId
|
||||
val pluginInfo = if (pluginId != null) getPluginInfoById(PluginId.getId(pluginId)) else platformPlugin
|
||||
value.isChangedFromDefault() && pluginInfo.isSafeToReport()
|
||||
}
|
||||
.map { v: RegistryValue -> v.key + "=" + v.asString() }
|
||||
.toList()
|
||||
}
|
||||
|
||||
private fun getDisabledPlugins(): List<String> = getPluginsNamesWithVersion { p: IdeaPluginDescriptor -> !p.isEnabled }
|
||||
|
||||
|
||||
@@ -95,6 +95,20 @@ f:com.intellij.codeInsight.inline.completion.suggestion.InlineCompletionVariant$
|
||||
c:com.intellij.execution.wsl.WSLDistribution
|
||||
- com.intellij.execution.wsl.AbstractWslDistribution
|
||||
- *:getUNCRootPath():java.nio.file.Path
|
||||
*:com.intellij.frontend.HostIdeInfoService
|
||||
- a:getHostInfo():com.intellij.frontend.HostInfo
|
||||
*f:com.intellij.frontend.HostInfo
|
||||
- <init>(java.lang.String,java.lang.String,java.lang.String):V
|
||||
- f:component1():java.lang.String
|
||||
- f:component2():java.lang.String
|
||||
- f:component3():java.lang.String
|
||||
- f:copy(java.lang.String,java.lang.String,java.lang.String):com.intellij.frontend.HostInfo
|
||||
- bs:copy$default(com.intellij.frontend.HostInfo,java.lang.String,java.lang.String,java.lang.String,I,java.lang.Object):com.intellij.frontend.HostInfo
|
||||
- equals(java.lang.Object):Z
|
||||
- f:getOsName():java.lang.String
|
||||
- f:getOsVersion():java.lang.String
|
||||
- f:getProductCode():java.lang.String
|
||||
- hashCode():I
|
||||
*:com.intellij.ide.CommandLineInspectionProjectAsyncConfigurator
|
||||
- com.intellij.ide.CommandLineInspectionProjectConfigurator
|
||||
- configureProject(com.intellij.openapi.project.Project,com.intellij.ide.CommandLineInspectionProjectConfigurator$ConfiguratorContext):V
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.frontend
|
||||
|
||||
import com.intellij.openapi.application.ApplicationInfo
|
||||
import com.intellij.util.system.OS
|
||||
|
||||
internal class DefaultHostIdeInfoService : HostIdeInfoService {
|
||||
override fun getHostInfo(): HostInfo {
|
||||
return HostInfo(productCode = ApplicationInfo.getInstance().build.productCode,
|
||||
osName = OS.CURRENT.name,
|
||||
osVersion = OS.CURRENT.version)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.frontend
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
/**
|
||||
* Provides access to product information for both the front-end and monolith code.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
interface HostIdeInfoService {
|
||||
fun getHostInfo(): HostInfo?
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
data class HostInfo(
|
||||
val productCode: String,
|
||||
val osName: String,
|
||||
val osVersion: String
|
||||
)
|
||||
@@ -1170,6 +1170,8 @@
|
||||
serviceImplementation="com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.GlobalIgnoredPluginSuggestionState"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.updateSettings.impl.UpdateRequestParametersProvider"
|
||||
serviceImplementation="com.intellij.openapi.updateSettings.impl.DefaultUpdateRequestParametersProvider"/>
|
||||
<applicationService serviceInterface="com.intellij.frontend.HostIdeInfoService"
|
||||
serviceImplementation="com.intellij.frontend.DefaultHostIdeInfoService"/>
|
||||
<dependencyCollector kind="executable"
|
||||
implementation="com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.EnvironmentDependencyCollector"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user