File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ val gradleToolingExtensionJar = tasks.register<Jar>(gradleToolingExtensionSource
6969
7070repositories {
7171 maven(" https://repo.denwav.dev/repository/maven-public/" )
72+ maven(" https://www.jetbrains.com/intellij-repository/snapshots" )
7273 mavenCentral()
7374}
7475
@@ -154,7 +155,7 @@ tasks.publishPlugin {
154155}
155156
156157tasks.runPluginVerifier {
157- ideVersions.addAll(" IC-2021.3 " )
158+ ideVersions.addAll(" IC-2022.1 " )
158159}
159160
160161java {
@@ -180,11 +181,9 @@ tasks.withType<KotlinCompile>().configureEach {
180181// This is for maximum compatibility, these classes will be loaded into every Gradle import on all
181182// projects (not just Minecraft), so we don't want to break that with an incompatible class version.
182183tasks.named(gradleToolingExtensionSourceSet.compileJavaTaskName, JavaCompile ::class ) {
183- val java7Compiler = javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion .of(8 )) }
184+ val java7Compiler = javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion .of(11 )) }
184185 javaCompiler.set(java7Compiler)
185- options.release.set(null as Int? )
186- sourceCompatibility = " 1.5"
187- targetCompatibility = " 1.5"
186+ options.release.set(6 )
188187 options.bootstrapClasspath = files(java7Compiler.map { it.metadata.installationPath.file(" jre/lib/rt.jar" ) })
189188 options.compilerArgs = listOf (" -Xlint:-options" )
190189}
Original file line number Diff line number Diff line change 1111# suppress inspection "UnusedProperty" for whole file
1212kotlin.code.style =official
1313
14- ideaVersion = 2021.3
15- ideaVersionName = 2021.3
14+ ideaVersion = 221-EAP-SNAPSHOT
15+ ideaVersionName = 2022.1
1616
1717coreVersion = 1.5.18
1818downloadIdeaSources = true
1919
20- pluginTomlVersion = 213.5744.224
20+ pluginTomlVersion = 221.3427.87
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ jflex-skeleton = "org.jetbrains.idea:jflex:1.7.0-c1fdf11"
1515grammarKit = " org.jetbrains.idea:grammar-kit:1.5.1"
1616
1717# Gradle Tooling
18- gradleToolingExtension = " com.jetbrains.intellij.gradle:gradle-tooling-extension:213.5744.223 "
18+ gradleToolingExtension = " com.jetbrains.intellij.gradle:gradle-tooling-extension:221.3427.89-EAP-SNAPSHOT "
1919annotations = " org.jetbrains:annotations:20.1.0"
2020groovy = " org.codehaus.groovy:groovy-all:2.5.14"
2121
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ private class NbtFileEditor(
6565) : FileEditor {
6666
6767 private var editor: FileEditor ? = null
68+ private val editorCheckedDisposable = Disposer .newCheckedDisposable()
6869 private val component = JPanel (BorderLayout ())
6970
7071 init {
@@ -83,6 +84,7 @@ private class NbtFileEditor(
8384 editor?.let { editor ->
8485 try {
8586 Disposer .register(this , editor)
87+ Disposer .register(editor, editorCheckedDisposable)
8688 } catch (e: IncorrectOperationException ) {
8789 // The editor can be disposed really quickly when opening a large number of NBT files
8890 // Since everything happens basically at the same time, calling Disposer.isDisposed right before
@@ -140,7 +142,7 @@ private class NbtFileEditor(
140142 override fun toString () = editor.toString()
141143
142144 private inline fun <T : Any ?> FileEditor?.exec (action : FileEditor .() -> T ): T ? {
143- if (editor?. let { ed -> Disposer .isDisposed(ed) } == true ) {
145+ if (editor == null || editorCheckedDisposable .isDisposed) {
144146 return null
145147 }
146148 return this ?.action()
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import com.demonwav.mcdev.translations.Translation
1414import com.demonwav.mcdev.translations.lang.LangFile
1515import com.demonwav.mcdev.translations.lang.LangFileType
1616import com.demonwav.mcdev.translations.lang.gen.psi.LangEntry
17+ import com.demonwav.mcdev.util.childrenOfType
1718import com.google.gson.JsonParser
1819import com.google.gson.JsonSyntaxException
1920import com.intellij.json.JsonFileType
@@ -30,7 +31,6 @@ import com.intellij.psi.util.CachedValueProvider
3031import com.intellij.psi.util.CachedValuesManager
3132import com.intellij.psi.util.PsiModificationTracker
3233import com.intellij.util.indexing.FileContent
33- import org.jetbrains.plugins.groovy.lang.psi.util.childrenOfType
3434
3535interface TranslationProvider {
3636 fun map (domain : String , input : FileContent ): TranslationIndexEntry ?
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ abstract class ProjectBuilderTest(descriptor: LightProjectDescriptor? = null) {
3535
3636 init {
3737 val lightFixture = IdeaTestFixtureFactory .getFixtureFactory()
38- .createLightFixtureBuilder(descriptor)
38+ .createLightFixtureBuilder(descriptor, " mcdev_test_project " )
3939 .fixture
4040
4141 // This is a poorly named class - it actually means create a temp dir test fixture _in-memory_
You can’t perform that action at this time.
0 commit comments