Skip to content

Commit 6cabf0a

Browse files
committed
Fix #38: IndexNotReadyException when loading non-libgdx project.
Version 1.24.8.
1 parent 451e3d4 commit 6cabf0a

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.24.8
2+
* Fix [#38](https://github.com/BlueBoxWare/LibGDXPlugin/issues/38): IndexNotReadyException when loading non-libgdx project.
3+
14
### 1.24.7
25
* Fix [#37](https://github.com/BlueBoxWare/LibGDXPlugin/issues/37): Gutter Color display support for hexadecimal Color(int) constructor in Kotlin.
36
* Fix "doing work on EDT" errors.

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
pluginGroup = com.gmail.blueboxware
22
pluginName = LibGDX Plugin
3-
pluginVersion = 1.24.7
3+
pluginVersion = 1.24.8
44

55
pluginSinceBuild = 232.6095.10
66
pluginUntilBuild =
77

88
# https://www.jetbrains.com/intellij-repository/snapshots/
99
# https://www.jetbrains.com/intellij-repository/releases/
10+
# gradle printProductsReleases
1011
pluginVerifierIdeVersions = 232.9921.47
1112

1213
platformType = IC

src/main/kotlin/com/gmail/blueboxware/libgdxplugin/versions/VersionService.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.gmail.blueboxware.libgdxplugin.utils.SkinTagsModificationTracker
44
import com.gmail.blueboxware.libgdxplugin.utils.findClasses
55
import com.gmail.blueboxware.libgdxplugin.utils.getLibraryInfoFromIdeaLibrary
66
import com.intellij.openapi.Disposable
7+
import com.intellij.openapi.application.ApplicationManager
78
import com.intellij.openapi.components.Service
89
import com.intellij.openapi.diagnostic.Logger
910
import com.intellij.openapi.project.DumbService
@@ -108,8 +109,11 @@ class VersionService(val project: Project) : Disposable {
108109
?.let { usedVersions[Libraries.LIBGDX] = it }
109110
}
110111
}
111-
112-
DumbService.getInstance(project).runReadActionInSmartMode(runnable)
112+
if (ApplicationManager.getApplication().isUnitTestMode) {
113+
DumbService.getInstance(project).runReadActionInSmartMode(runnable)
114+
} else {
115+
DumbService.getInstance(project).smartInvokeLater(runnable)
116+
}
113117
}
114118

115119
if (isLibGDXProject()) {

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131

3232
<change-notes><![CDATA[
3333
<ul>
34-
<li>Fix 37: Gutter Color display support for hexadecimal Color(int) constructor in Kotlin.</li>
35-
<li>Fix "doing work on EDT" errors.</li>
34+
<li>Fix 38: IndexNotReadyException</li>
3635
</ul>
3736
]]>
3837
</change-notes>

0 commit comments

Comments
 (0)