OPENIDE #172 Fix some problems found for version 2025.1

(cherry picked from commit 8ee333dbc6)

(cherry picked from commit 941e50fa07)
(cherry picked from commit 6852fe26fa)
(cherry picked from commit 544603c559)
This commit is contained in:
Nikita Iarychenko
2026-09-16 13:49:23 +04:00
parent 02b141dd03
commit 7cf9ad31f6
7 changed files with 24 additions and 15 deletions
+2 -2
View File
@@ -1881,8 +1881,8 @@
<module fileurl="file://$PROJECT_DIR$/plugins/settings-repository/intellij.settingsRepository.iml" filepath="$PROJECT_DIR$/plugins/settings-repository/intellij.settingsRepository.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/settings-repository/intellij.settingsRepository.tests.iml" filepath="$PROJECT_DIR$/plugins/settings-repository/intellij.settingsRepository.tests.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/sh/backend/intellij.sh.backend.iml" filepath="$PROJECT_DIR$/plugins/sh/backend/intellij.sh.backend.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/settings-sync/jba/intellij.settingsSync.iml" filepath="$PROJECT_DIR$/plugins/settings-sync/jba/intellij.settingsSync.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/settings-sync-core/intellij.settingsSync.core.iml" filepath="$PROJECT_DIR$/platform/settings-sync-core/intellij.settingsSync.core.iml" />
<!-- <module fileurl="file://$PROJECT_DIR$/plugins/settings-sync/jba/intellij.settingsSync.iml" filepath="$PROJECT_DIR$/plugins/settings-sync/jba/intellij.settingsSync.iml" />-->
<!-- <module fileurl="file://$PROJECT_DIR$/platform/settings-sync-core/intellij.settingsSync.core.iml" filepath="$PROJECT_DIR$/platform/settings-sync-core/intellij.settingsSync.core.iml" />-->
<module fileurl="file://$PROJECT_DIR$/plugins/sh/copyright/intellij.sh.copyright.iml" filepath="$PROJECT_DIR$/plugins/sh/copyright/intellij.sh.copyright.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/sh/copyright/intellij.sh.copyright.tests.iml" filepath="$PROJECT_DIR$/plugins/sh/copyright/intellij.sh.copyright.tests.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/sh/core/intellij.sh.core.iml" filepath="$PROJECT_DIR$/plugins/sh/core/intellij.sh.core.iml" />
@@ -55,7 +55,7 @@ object OpenIdePluginBundler {
private fun findFragmentUrl(element: Element?, majorVersion: String): String {
return element?.getChildren("plugin")
?.firstOrNull { it.getAttributeValue("version").extractMajorVersion() == majorVersion }
?.lastOrNull { it.getAttributeValue("version").extractMajorVersion() == majorVersion }
?.getAttributeValue("url")
?: throw RuntimeException("Amlicode plugin url not found for $majorVersion version")
}
@@ -96,15 +96,15 @@ open class ITNReporter internal constructor(private val postUrl: URI?) : ErrorRe
): Boolean {
service<ITNProxyCoroutineScopeHolder>().coroutineScope.launch {
try {
val reportId = if (project != null) {
if (project != null) {
withBackgroundProgress(project, DiagnosticBundle.message("title.submitting.error.report")) {
ITNProxy.sendError(errorBean, postUrl)
ITNUtils.sendError(errorBean)
}
}
else {
ITNProxy.sendError(errorBean, postUrl)
ITNUtils.sendError(errorBean)
}
onSuccess(project, reportId, callback)
onSuccess(project, callback)
}
catch (e: Exception) {
onError(project, e, errorBean, parentComponent, callback)
@@ -113,10 +113,8 @@ open class ITNReporter internal constructor(private val postUrl: URI?) : ErrorRe
return true
}
private fun onSuccess(project: Project?, reportId: Long, callback: (SubmittedReportInfo) -> Unit) {
val reportUrl = ITNProxy.getBrowseUrl(reportId)
callback(SubmittedReportInfo(reportUrl, reportId.toString(), SubmittedReportInfo.SubmissionStatus.NEW_ISSUE))
private fun onSuccess(project: Project?, callback: (SubmittedReportInfo) -> Unit) {
callback(SubmittedReportInfo(SubmittedReportInfo.SubmissionStatus.NEW_ISSUE))
if (!NOTIFY_SUCCESS_EACH_REPORT.get()) return
val content = DiagnosticBundle.message("error.report.gratitude")
@@ -17,11 +17,13 @@ import com.intellij.ide.ApplicationActivity
import com.intellij.idea.IdeaLogger
import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.diagnostic.IdeaLoggingEvent
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.util.SystemInfo
import com.intellij.openapi.util.io.FileUtilRt
import com.intellij.openapi.util.text.StringUtil
import com.intellij.util.ObjectUtils
import com.intellij.util.asSafely
import io.sentry.Sentry
import io.sentry.SentryEvent
import io.sentry.SentryLevel
@@ -39,7 +41,7 @@ object ITNUtils {
internal fun sendError(error: ITNProxy.ErrorBean) {
val event = SentryEvent()
event.level = SentryLevel.ERROR
event.throwable = (error.event as IdeaReportingEvent).data.throwable
event.throwable = (error.event).data.asSafely<AbstractMessage>()?.throwable
event.release = ApplicationInfo.getInstance().build.asString()
event.user = User().apply {
@@ -377,6 +377,7 @@ public final class ConsentOptions implements ModificationTracker {
else {
// EAP feedback consent is relevant to EA builds only
allDefaults.remove(lookupConsentID(EAP_FEEDBACK_OPTION_ID));
allDefaults.remove(AI_DATA_COLLECTION_OPTION_ID);
}
if (!ExceptionAutoReportUtil.isConsentAllowedToBeVisible()) {
@@ -18,6 +18,7 @@ import ru.openide.welcome.screen.editor.WelcomeScreenFile
import ru.openide.welcome.screen.editor.WelcomeScreenFileSystem
import ru.openide.welcome.screen.editor.WelcomeScreenFileType
import com.intellij.openapi.application.invokeLater
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.extensions.PluginId
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.fileEditor.OpenFileDescriptor
@@ -34,7 +35,10 @@ import ru.openide.html.*
class WelcomeScreenHelper(val project: Project) {
fun showWelcomeScreen() {
if (!JBCefApp.isSupported()) return
if (!JBCefApp.isSupported()) {
LOG.info("JBCef is not supported!")
return
}
val editorManager = FileEditorManager.getInstance(project)
val openedWelcome = editorManager.allEditors.firstOrNull(WelcomeScreenFileType::isMyEditor)
@@ -49,7 +53,10 @@ class WelcomeScreenHelper(val project: Project) {
}
fun createModel(file: VirtualFile): HtmlCefEditorModel? {
if (!WelcomeScreenFileType.isMyFile(file)) return null
if (!WelcomeScreenFileType.isMyFile(file)) {
LOG.info("Filetype for WelcomeScreen is ${file.fileType.name}")
return null
}
val htmlTemplate = HtmlEditorTemplate(TEMPLATE_NAME).apply {
addParam(THEME, if (StartupUiUtil.isDarkTheme) "theme-dark" else "")
}
@@ -105,5 +112,6 @@ class WelcomeScreenHelper(val project: Project) {
private const val SUGGESTION_QUERY_NAME = "suggestionQuery"
private const val PYTHON_PLUGIN_ID = "PythonCore"
private const val DOCKER_PLUGIN_ID = "ru.openide.docker"
private val LOG = logger<WelcomeScreenHelper>()
}
}
@@ -28,6 +28,6 @@
<registryKey defaultValue="false" description="Whats new test mode" key="whats.new.test.mode" restartRequired="false" />
</extensions>
<actions resource-bundle="messages.ActionsBundle">
<action id="WhatsNewAction" class="com.intellij.platform.whatsNew.WhatsNewAction" overrides="true"/>
<!--<action id="WhatsNewAction" class="com.intellij.platform.whatsNew.WhatsNewAction" overrides="true"/>-->
</actions>
</idea-plugin>