diff --git a/CHANGELOG.md b/CHANGELOG.md index 73384e1..4d9d39a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ #### Unreleased +#### 5.9.0 + +- Added 2023.3 Build Support +- Removed some internal API usages + #### 5.8.0 - Added 2023.2 Build Support diff --git a/build.gradle b/build.gradle index ace4fdf..850c005 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ tasks.runPluginVerifier { tasks.patchPluginXml { version.set(projectVersion) sinceBuild.set('203.7148.57') - untilBuild.set('232.*') + untilBuild.set('233.*') def changelogPath = "$projectDir/build/html/CHANGELOG.html" def readmePath = "$projectDir/build/html/README.html" diff --git a/src/main/kotlin/com/markskelton/integrations/ErrorReporter.kt b/src/main/kotlin/com/markskelton/integrations/ErrorReporter.kt index 625a58d..9989239 100644 --- a/src/main/kotlin/com/markskelton/integrations/ErrorReporter.kt +++ b/src/main/kotlin/com/markskelton/integrations/ErrorReporter.kt @@ -1,20 +1,13 @@ package com.markskelton.integrations import com.intellij.ide.IdeBundle -import com.intellij.ide.plugins.PluginManagerCore -import com.intellij.ide.ui.LafManager import com.intellij.openapi.application.ApplicationManager -import com.intellij.openapi.application.ApplicationNamesInfo -import com.intellij.openapi.application.ex.ApplicationInfoEx -import com.intellij.openapi.application.impl.ApplicationInfoImpl import com.intellij.openapi.diagnostic.ErrorReportSubmitter import com.intellij.openapi.diagnostic.IdeaLoggingEvent import com.intellij.openapi.diagnostic.SubmittedReportInfo import com.intellij.openapi.util.SystemInfo import com.intellij.openapi.util.io.FileUtilRt -import com.intellij.openapi.util.registry.Registry import com.intellij.util.Consumer -import com.intellij.util.text.DateFormatUtil import com.markskelton.settings.ThemeSettings import com.markskelton.tools.runSafely import com.markskelton.tools.runSafelyWithResult @@ -26,8 +19,6 @@ import io.sentry.protocol.Message import io.sentry.protocol.User import java.awt.Component import java.lang.management.ManagementFactory -import java.text.SimpleDateFormat -import java.util.Arrays import java.util.Properties import java.util.stream.Collectors @@ -62,7 +53,6 @@ class ErrorReporter : ErrorReportSubmitter() { SentryEvent() .apply { this.level = SentryLevel.ERROR - this.serverName = getAppName().second this.setExtra("Additional Info", additionalInfo ?: "None") } ).apply { @@ -82,22 +72,14 @@ class ErrorReporter : ErrorReportSubmitter() { } private fun addSystemInfo(event: SentryEvent): SentryEvent { - val pair = getAppName() - val appInfo = pair.first - val appName = pair.second val properties = System.getProperties() return event.apply { - setExtra("App Name", appName) - setExtra("Build Info", getBuildInfo(appInfo)) setExtra("JRE", getJRE(properties)) setExtra("VM", getVM(properties)) setExtra("System Info", SystemInfo.getOsNameAndVersion()) setExtra("GC", getGC()) setExtra("Memory", Runtime.getRuntime().maxMemory() / FileUtilRt.MEGABYTE) setExtra("Cores", Runtime.getRuntime().availableProcessors()) - setExtra("Registry", getRegistry()) - setExtra("Non-Bundled Plugins", getNonBundledPlugins()) - setExtra("Current LAF", LafManager.getInstance().currentLookAndFeel?.name ?: "") setExtra("One Dark Config", ThemeSettings.instance.asJson()) } } @@ -114,35 +96,6 @@ class ErrorReporter : ErrorReportSubmitter() { return IdeBundle.message("about.box.vm", vmVersion, vmVendor) } - private fun getNonBundledPlugins(): String { - return Arrays.stream(PluginManagerCore.getPlugins()) - .filter { p -> !p.isBundled && p.isEnabled } - .map { p -> p.pluginId.idString }.collect(Collectors.joining(",")) - } - - private fun getRegistry() = Registry.getAll().stream().filter { it.isChangedFromDefault } - .map { v -> v.key + "=" + v.asString() }.collect(Collectors.joining(",")) - private fun getGC() = ManagementFactory.getGarbageCollectorMXBeans().stream() .map { it.name }.collect(Collectors.joining(",")) - - private fun getBuildInfo(appInfo: ApplicationInfoImpl): String { - var buildInfo = IdeBundle.message("about.box.build.number", appInfo.build.asString()) - val cal = appInfo.buildDate - var buildDate = "" - if (appInfo.build.isSnapshot) { - buildDate = SimpleDateFormat("HH:mm, ").format(cal.time) - } - buildDate += DateFormatUtil.formatAboutDialogDate(cal.time) - buildInfo += IdeBundle.message("about.box.build.date", buildDate) - return buildInfo - } - - private fun getAppName(): Pair { - val appInfo = ApplicationInfoEx.getInstanceEx() as ApplicationInfoImpl - var appName = appInfo.fullApplicationName - val edition = ApplicationNamesInfo.getInstance().editionName - if (edition != null) appName += " ($edition)" - return Pair(appInfo, appName) - } } diff --git a/src/main/kotlin/com/markskelton/notification/Notifications.kt b/src/main/kotlin/com/markskelton/notification/Notifications.kt index ff0539b..bd3db2d 100644 --- a/src/main/kotlin/com/markskelton/notification/Notifications.kt +++ b/src/main/kotlin/com/markskelton/notification/Notifications.kt @@ -13,7 +13,7 @@ import org.intellij.lang.annotations.Language val UPDATE_MESSAGE: String = """ What's New?

Please see the Changelog for more details.