diff --git a/platform/feedback/resources/messages/CommonFeedbackMessagesBundle.properties b/platform/feedback/resources/messages/CommonFeedbackMessagesBundle.properties index bc02cf553eed..6cc043d11314 100644 --- a/platform/feedback/resources/messages/CommonFeedbackMessagesBundle.properties +++ b/platform/feedback/resources/messages/CommonFeedbackMessagesBundle.properties @@ -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 diff --git a/platform/feedback/src/com/intellij/platform/feedback/dialog/CommonFeedbackSystemData.kt b/platform/feedback/src/com/intellij/platform/feedback/dialog/CommonFeedbackSystemData.kt index ebadde51bf77..5e7a0dbed580 100644 --- a/platform/feedback/src/com/intellij/platform/feedback/dialog/CommonFeedbackSystemData.kt +++ b/platform/feedback/src/com/intellij/platform/feedback/dialog/CommonFeedbackSystemData.kt @@ -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().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 = 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 { + 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 = getPluginsNamesWithVersion { p: IdeaPluginDescriptor -> !p.isEnabled } diff --git a/platform/platform-impl/api-dump-experimental.txt b/platform/platform-impl/api-dump-experimental.txt index 3c868d88d804..9f9683497818 100644 --- a/platform/platform-impl/api-dump-experimental.txt +++ b/platform/platform-impl/api-dump-experimental.txt @@ -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 +- (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 diff --git a/platform/platform-impl/src/com/intellij/frontend/DefaultHostIdeInfoService.kt b/platform/platform-impl/src/com/intellij/frontend/DefaultHostIdeInfoService.kt new file mode 100644 index 000000000000..91f3a0a94567 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/frontend/DefaultHostIdeInfoService.kt @@ -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) + } +} diff --git a/platform/platform-impl/src/com/intellij/frontend/HostIdeInfoService.kt b/platform/platform-impl/src/com/intellij/frontend/HostIdeInfoService.kt new file mode 100644 index 000000000000..8179e113faab --- /dev/null +++ b/platform/platform-impl/src/com/intellij/frontend/HostIdeInfoService.kt @@ -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 +) \ No newline at end of file diff --git a/platform/platform-resources/src/META-INF/PlatformExtensions.xml b/platform/platform-resources/src/META-INF/PlatformExtensions.xml index 25be103674d6..bc1f8b48ae87 100644 --- a/platform/platform-resources/src/META-INF/PlatformExtensions.xml +++ b/platform/platform-resources/src/META-INF/PlatformExtensions.xml @@ -1170,6 +1170,8 @@ serviceImplementation="com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.GlobalIgnoredPluginSuggestionState"/> +