Skip to content

Commit

Permalink
Migrated references to internal JetBrains SDK APIs. (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Unthrottled authored Mar 12, 2023
1 parent eef728e commit 597327c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## [Unreleased]

## 88.3-1.0.11 [Maintenance]

### Fixed

- References to internal JetBrains SDK APIs.

## 88.3-1.0.10 [Settings Menu Restoration]

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
### Fixed

- Issue on plugin startup for IDEs with non-JetBrains java runtimes.
- The VSC Branch icon on the EXP UI.
- The VSC Branch icon on the EXP UI.
- References to internal JetBrains SDK APIs.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pluginGroup = io.unthrottled.doki.icons
pluginName = Doki Theme Icons
pluginVersion = 88.3-1.0.10
pluginVersion = 88.3-1.0.11

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 222
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.project.ProjectManagerListener
import io.unthrottled.doki.icons.jetbrains.laf.LAFIconReplacementComponent
import io.unthrottled.doki.icons.jetbrains.onboarding.UserOnBoarding
import io.unthrottled.doki.icons.jetbrains.path.ExperimentalUIBastardizer
import io.unthrottled.doki.icons.jetbrains.path.ExperimentalUIFixer
import io.unthrottled.doki.icons.jetbrains.path.IconPathReplacementComponent
import io.unthrottled.doki.icons.jetbrains.svg.ThemedSVGManager
import io.unthrottled.doki.icons.jetbrains.themes.IconThemeManager
Expand All @@ -19,7 +19,7 @@ class PluginMaster : ProjectManagerListener, Disposable, Logging {

companion object {
init {
ExperimentalUIBastardizer.bastardizeExperimentalUI()
ExperimentalUIFixer.fixExperimentalUI()
}
val instance: PluginMaster
get() = ApplicationManager.getApplication().getService(PluginMaster::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.intellij.openapi.diagnostic.Logger
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 io.sentry.Sentry
import io.sentry.SentryEvent
Expand Down Expand Up @@ -101,7 +100,6 @@ class ErrorReporter : ErrorReportSubmitter() {
setExtra("GC", getGC())
setExtra("Memory", Runtime.getRuntime().maxMemory() / FileUtilRt.MEGABYTE)
setExtra("Cores", Runtime.getRuntime().availableProcessors())
setExtra("Registry", getRegistry())
setExtra("Non-Bundled Plugins", getNonBundledPlugins())
setExtra("Plugin Config", gson.toJson(Config.instance))
}
Expand All @@ -128,9 +126,6 @@ class ErrorReporter : ErrorReportSubmitter() {
.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(","))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import com.intellij.openapi.util.IconPathPatcher
import com.intellij.ui.ExperimentalUI
import io.unthrottled.doki.icons.jetbrains.tools.runSafely

object ExperimentalUIBastardizer {
object ExperimentalUIFixer {

init {
bastardizeExperimentalUI()
fixExperimentalUI()
}

@Suppress("UnstableApiUsage")
fun bastardizeExperimentalUI() {
fun fixExperimentalUI() {
if (!ExperimentalUI.isNewUI()) return

runSafely({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object IconPathReplacementComponent : IconConfigListener {
}

fun installComponents() {
ExperimentalUIBastardizer.bastardizeExperimentalUI()
ExperimentalUIFixer.fixExperimentalUI()

iconInstallPacs.forEach { pak ->
IconLoader.removePathPatcher(pak.iconPatcher)
Expand Down Expand Up @@ -92,7 +92,7 @@ object IconPathReplacementComponent : IconConfigListener {
}

private fun refresh() {
ExperimentalUIBastardizer.bastardizeExperimentalUI()
ExperimentalUIFixer.fixExperimentalUI()
ApplicationManager.getApplication().invokeLater {
val app = ApplicationManager.getApplication()
app.runWriteAction { FileTypeManagerEx.getInstanceEx().fireFileTypesChanged() }
Expand Down

0 comments on commit 597327c

Please sign in to comment.