Skip to content

Commit 90ec4b0

Browse files
committed
Updates for 2026.1
1 parent b662717 commit 90ec4b0

21 files changed

Lines changed: 67 additions & 103 deletions

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ dependencies {
116116
bundledPlugin("com.intellij.java")
117117
bundledPlugin("org.jetbrains.idea.maven")
118118
bundledPlugin("com.intellij.gradle")
119+
bundledPlugin("org.jetbrains.idea.reposearch")
119120
bundledPlugin("org.intellij.groovy")
120121
bundledPlugin("ByteCodeViewer")
121122
bundledModule("intellij.platform.langInjection")

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# https://mcdev.io/
55
#
6-
# Copyright (C) 2025 minecraft-dev
6+
# Copyright (C) 2026 minecraft-dev
77
#
88
# This program is free software: you can redistribute it and/or modify
99
# it under the terms of the GNU Lesser General Public License as published
@@ -21,7 +21,7 @@
2121
# suppress inspection "UnusedProperty" for whole file
2222
org.gradle.jvmargs=-Xmx1g
2323

24-
ideaVersionName = 2025.3
24+
ideaVersionName = 2026.1
2525

2626
coreVersion = 1.8.12
2727

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
# https://github.com/JetBrains/intellij-community/blob/<version>/.idea/libraries/kotlin_stdlib.xml
3-
kotlin = "2.2.20"
3+
kotlin = "2.3.20-RC2"
44
# https://github.com/JetBrains/intellij-community/blob/<version>/.idea/libraries/kotlinx_coroutines_core.xml
55
coroutines = "1.10.2"
66
junit = "6.0.3"
@@ -14,7 +14,7 @@ intellij-plugin = "2.13.1"
1414
intellij-plugin-repository-rest-client = "2.0.50"
1515
# https://www.jetbrains.com/intellij-repository/snapshots or https://www.jetbrains.com/intellij-repository/releases/
1616
# Search for com.jetbrains.intellij.idea
17-
intellij-ide = "253.29346.138"
17+
intellij-ide = "261.22158.277"
1818
# https://github.com/JetBrains/gradle-idea-ext-plugin
1919
idea-ext = "1.4.1"
2020

src/main/kotlin/creator/buildsystem/maven-steps.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -195,7 +195,7 @@ class MavenImportStep(parent: NewProjectWizardStep) : AbstractLongRunningStep(pa
195195
val templateConfig = mavenConfigFactory.createTemplateConfiguration(project)
196196
val runConfiguration = mavenConfigFactory.createConfiguration(runConfigName, templateConfig)
197197
as MavenRunConfiguration
198-
runConfiguration.runnerParameters.goals.add(task)
198+
runConfiguration.runnerParameters.goals = listOf(task)
199199
runConfiguration.runnerParameters.workingDirPath = context.projectDirectory.toString()
200200

201201
runConfiguration.isAllowRunningInParallel = false

src/main/kotlin/creator/custom/types/GradlePluginSelectorCreatorProperty.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -43,7 +43,7 @@ import com.intellij.ui.dsl.builder.bindItem
4343
import com.intellij.ui.dsl.builder.bindSelected
4444
import com.intellij.ui.dsl.builder.bindText
4545
import com.intellij.util.ui.AsyncProcessIcon
46-
import fleet.multiplatform.shims.ConcurrentHashMap
46+
import java.util.concurrent.ConcurrentHashMap
4747
import java.util.function.Function
4848
import kotlinx.coroutines.Dispatchers
4949
import kotlinx.coroutines.launch

src/main/kotlin/creator/step/AbstractReformatFilesStep.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -50,7 +50,7 @@ abstract class AbstractReformatFilesStep(parent: NewProjectWizardStep) : Abstrac
5050

5151
val rootDir = VfsUtil.findFile(Path.of(context.projectFileDirectory), true) ?: return
5252
val psiManager = PsiManager.getInstance(project)
53-
val files = ReadAction.compute<Array<PsiFile>, Throwable> {
53+
val files = ReadAction.computeBlocking<Array<PsiFile>, Throwable> {
5454
filesToReformat.mapNotNull { path ->
5555
VfsUtil.findRelativeFile(rootDir, *path.split('/').toTypedArray())?.let(psiManager::findFile)
5656
}.toTypedArray()

src/main/kotlin/facet/MinecraftFacet.kt

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -32,14 +32,12 @@ import com.demonwav.mcdev.util.runWriteActionAndWait
3232
import com.google.common.collect.HashMultimap
3333
import com.intellij.facet.Facet
3434
import com.intellij.facet.FacetManager
35+
import com.intellij.facet.FacetType
3536
import com.intellij.facet.FacetTypeId
3637
import com.intellij.facet.FacetTypeRegistry
3738
import com.intellij.ide.projectView.ProjectView
38-
import com.intellij.openapi.application.runReadAction
3939
import com.intellij.openapi.application.runWriteAction
4040
import com.intellij.openapi.module.Module
41-
import com.intellij.openapi.module.ModuleGrouper
42-
import com.intellij.openapi.module.ModuleManager
4341
import com.intellij.openapi.roots.ModuleRootManager
4442
import com.intellij.openapi.vfs.VirtualFile
4543
import com.intellij.psi.PsiClass
@@ -220,14 +218,14 @@ class MinecraftFacet(
220218
fun findFile(path: String, type: SourceType): VirtualFile? {
221219
try {
222220
return findFile0(path, type)
223-
} catch (ignored: RefreshRootsException) {
221+
} catch (_: RefreshRootsException) {
224222
}
225223

226224
updateRoots()
227225

228226
return try {
229227
findFile0(path, type)
230-
} catch (ignored: RefreshRootsException) {
228+
} catch (_: RefreshRootsException) {
231229
// Well we tried our best
232230
null
233231
}
@@ -261,32 +259,6 @@ class MinecraftFacet(
261259

262260
fun getInstance(module: Module) = FacetManager.getInstance(module).getFacetByType(ID)
263261

264-
fun getChildInstances(module: Module) = runReadAction run@{
265-
val instance = getInstance(module)
266-
if (instance != null) {
267-
return@run setOf(instance)
268-
}
269-
270-
val project = module.project
271-
val manager = ModuleManager.getInstance(project)
272-
val grouper = ModuleGrouper.instanceFor(project)
273-
274-
val result = mutableSetOf<MinecraftFacet>()
275-
276-
val modulePath = grouper.getModuleAsGroupPath(module) ?: return@run result
277-
278-
for (m in manager.modules) {
279-
val path = grouper.getGroupPath(m)
280-
if (modulePath != path) {
281-
continue
282-
}
283-
284-
val facet = getInstance(m) ?: continue
285-
result.add(facet)
286-
}
287-
return@run result
288-
}
289-
290262
fun <T : AbstractModule> getInstance(module: Module, type: AbstractModuleType<T>) =
291263
getInstance(module)?.getModuleOfType(type)
292264

src/main/kotlin/insight/generation/EventGenHelper.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import com.intellij.psi.PsiElement
3333
import com.intellij.psi.PsiFile
3434
import com.intellij.psi.codeStyle.CodeStyleManager
3535
import com.intellij.psi.util.parentOfType
36+
import org.jetbrains.kotlin.K1Deprecation
3637
import org.jetbrains.kotlin.analysis.api.KaIdeApi
3738
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences
3839
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferencesInRange
@@ -114,7 +115,7 @@ class KotlinEventGenHelper : EventGenHelper {
114115
val entry = factory.createSuperTypeEntry(fqn)
115116
val insertedEntry = ktClass.addSuperTypeListEntry(entry)
116117
when (KotlinPluginModeProvider.currentPluginMode) {
117-
KotlinPluginMode.K1 -> ShortenReferences.DEFAULT.process(insertedEntry)
118+
KotlinPluginMode.K1 -> @OptIn(K1Deprecation::class) ShortenReferences.DEFAULT.process(insertedEntry)
118119
// TODO find a non-internal alternative to this...
119120
KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferences(insertedEntry)
120121
}
@@ -128,7 +129,7 @@ class KotlinEventGenHelper : EventGenHelper {
128129

129130
val marker = JvmEventGenHelper.doReformat(project, file, startOffset, endOffset) ?: return
130131
when (KotlinPluginModeProvider.currentPluginMode) {
131-
KotlinPluginMode.K1 -> ShortenReferences.DEFAULT.process(file, marker.startOffset, marker.endOffset)
132+
KotlinPluginMode.K1 -> @OptIn(K1Deprecation::class) ShortenReferences.DEFAULT.process(file, marker.startOffset, marker.endOffset)
132133
// TODO find a non-internal alternative to this...
133134
KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferencesInRange(file, marker.textRange)
134135
}

src/main/kotlin/platform/fabric/reference/ResourceFileReference.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -27,7 +27,7 @@ import com.demonwav.mcdev.util.manipulator
2727
import com.demonwav.mcdev.util.mapFirstNotNull
2828
import com.demonwav.mcdev.util.reference.InspectionReference
2929
import com.intellij.json.psi.JsonStringLiteral
30-
import com.intellij.openapi.application.runReadAction
30+
import com.intellij.openapi.application.runReadActionBlocking
3131
import com.intellij.openapi.module.Module
3232
import com.intellij.openapi.module.ModuleManager
3333
import com.intellij.openapi.module.ModuleUtilCore
@@ -98,7 +98,7 @@ class ResourceFileReference(
9898
}
9999

100100
val variants = mutableListOf<Any>()
101-
runReadAction {
101+
runReadActionBlocking {
102102
val relevantModules = getRelevantModules()
103103

104104
val relevantRootTypes = mutableSetOf(JavaResourceRootType.RESOURCE)

src/main/kotlin/platform/mcp/ct/CtCompletionContributor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import com.intellij.codeInsight.completion.CompletionResultSet
3232
import com.intellij.codeInsight.completion.CompletionType
3333
import com.intellij.codeInsight.completion.InsertionContext
3434
import com.intellij.codeInsight.lookup.LookupElementBuilder
35-
import com.intellij.openapi.application.runReadAction
35+
import com.intellij.openapi.application.runReadActionBlocking
3636
import com.intellij.patterns.PlatformPatterns
3737
import com.intellij.psi.PsiDocumentManager
3838
import com.intellij.psi.TokenType
@@ -61,7 +61,7 @@ private fun insertWhitespace(context: InsertionContext) {
6161
context.document.insertString(context.editor.caretModel.offset, " ")
6262
context.editor.caretModel.moveCaretRelatively(1, 0, false, false, false)
6363
context.setLaterRunnable {
64-
runReadAction {
64+
runReadActionBlocking {
6565
CodeCompletionHandlerBase.createHandler(CompletionType.BASIC)
6666
.invokeCompletion(context.project, context.editor)
6767
}

0 commit comments

Comments
 (0)