From 3c65079aba2f6d25b7104d216e640cf47a784d06 Mon Sep 17 00:00:00 2001 From: Traben Date: Tue, 24 Nov 2026 22:02:43 +1000 Subject: [PATCH 1/4] - Various improvements to the "jump to preprocessed file" action, including: - Added an optional settings to hide missing files - Improved visibility for: missing files, override files, the main file. - Added checks that will highlight mixin errors present in the listed files. --- CHANGELOG.md | 4 + .../action/PreprocessorFileJumpAction.kt | 26 ++- .../config/PluginConfigurable.kt | 9 + .../intelliprocessor/config/PluginSettings.kt | 2 + .../intelliprocessor/utils/SourceSetFile.kt | 115 ++++++++++- .../utils/SourceSetFileDialog.kt | 182 +++++++++++++----- 6 files changed, 274 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a56ba95..f9b7e65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ # IntelliProcessor Changelog ## [Unreleased] +- Various improvements to the "jump to preprocessed file" action, including: + - Added an optional settings to hide missing files + - Improved visibility for: missing files, override files, the main file. + - Added checks that will highlight mixin errors present in the listed files. ## [4.2.0] - 2026-07-30 diff --git a/src/main/kotlin/org/polyfrost/intelliprocessor/action/PreprocessorFileJumpAction.kt b/src/main/kotlin/org/polyfrost/intelliprocessor/action/PreprocessorFileJumpAction.kt index 68dc2e0..59df5eb 100644 --- a/src/main/kotlin/org/polyfrost/intelliprocessor/action/PreprocessorFileJumpAction.kt +++ b/src/main/kotlin/org/polyfrost/intelliprocessor/action/PreprocessorFileJumpAction.kt @@ -9,6 +9,8 @@ import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.fileEditor.TextEditor import com.intellij.openapi.project.DumbAwareAction import com.intellij.openapi.project.Project +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.util.Disposer import com.intellij.openapi.vfs.VfsUtil import com.intellij.psi.PsiFile import com.intellij.psi.PsiManager @@ -19,14 +21,6 @@ import kotlin.io.path.relativeToOrNull open class PreprocessorFileJumpAction : DumbAwareAction() { - private companion object { - private const val GROUP_ID = "Jump Failure" - - private fun warning(project: Project, content: String) { - warning(project, GROUP_ID, content) - } - } - override fun actionPerformed(e: AnActionEvent) { val project = e.project ?: return val editor = e.getData(PlatformDataKeys.EDITOR) @@ -64,8 +58,11 @@ open class PreprocessorFileJumpAction : DumbAwareAction() { // For if the caret is inside a preprocessor conditional block, test each target version against the conditions val foundConditionContext = testTargetsAgainstPreprocessorConditions(currentPsiFile, editor, targets) + // The dialog is modeless, so close any dialog still open from a previous invocation, its caret context is stale + openDialog?.close(DialogWrapper.CANCEL_EXIT_CODE) + SourceSetFileDialog(project, targets, foundConditionContext) { selected -> - val virtualFile = VfsUtil.findFile(rootDirectory.resolve(selected.toRelativePath()), true) + val virtualFile = VfsUtil.findFile(selected.absolutePath, true) if (virtualFile == null) { warning( project, @@ -89,6 +86,11 @@ open class PreprocessorFileJumpAction : DumbAwareAction() { } else { warning(project, "Could not set cursor for non-text file") } + }.also { dialog -> + openDialog = dialog + Disposer.register(dialog.disposable) { + if (openDialog === dialog) openDialog = null + } }.show() } @@ -160,3 +162,9 @@ open class PreprocessorFileJumpAction : DumbAwareAction() { } } + +private var openDialog: SourceSetFileDialog? = null + +private fun warning(project: Project, content: String) { + warning(project, "Jump Failure", content) +} \ No newline at end of file diff --git a/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginConfigurable.kt b/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginConfigurable.kt index 51031a9..700d9f3 100644 --- a/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginConfigurable.kt +++ b/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginConfigurable.kt @@ -21,6 +21,7 @@ class PluginConfigurable : Configurable { private lateinit var colorNestedPreprocessorCommentsOnlyOnSameIndentCheckbox: JCheckBox private lateinit var inspectionHighlightContentNotMatchingIfIndentsCheckbox: JCheckBox private lateinit var inspectionRequireJavaKotlinSpacingInConditionsCheckbox: JCheckBox + private lateinit var hideMissingFilesCheckbox: JCheckBox override fun getDisplayName(): String = "IntelliProcessor" @@ -73,6 +74,9 @@ class PluginConfigurable : Configurable { inspectionRequireJavaKotlinSpacingInConditionsCheckbox = JCheckBox("Highlight non-standard Java / Kotlin spacing around operators in preprocessor conditions") .tooltip("Highlights improper use of spaces around operators in preprocessor conditions for improved readability.") + hideMissingFilesCheckbox = JCheckBox("Hide missing files in the 'Jump To Pre-Processed File' dialog") + .tooltip("Hides files in the 'Jump To Pre-Processed File' dialog that do not exist in the project directory, which can help reduce clutter when navigating through preprocessed files.") + // Arrange components fun titledBlock(str: String, block: JPanel.() -> Unit): JPanel = JPanel().apply { @@ -102,6 +106,7 @@ class PluginConfigurable : Configurable { add(titledBlock("Jump To Pre-Processed File Action") { add(hideUnmatchedVersionsCheckbox) + add(hideMissingFilesCheckbox) }) add(titledBlock("Misc") { @@ -128,6 +133,8 @@ class PluginConfigurable : Configurable { || colorNestedPreprocessorCommentsOnlyOnSameIndentCheckbox.isSelected != PluginSettings.instance.colorNestedPreprocessorCommentsOnlyOnSameIndent || inspectionHighlightContentNotMatchingIfIndentsCheckbox.isSelected != PluginSettings.instance.inspectionHighlightContentNotMatchingIfIndents || inspectionRequireJavaKotlinSpacingInConditionsCheckbox.isSelected != PluginSettings.instance.inspectionRequireJavaKotlinSpacingInConditions + || hideMissingFilesCheckbox.isSelected != PluginSettings.instance.hideMissingFiles + override fun apply() { PluginSettings.instance.foldAllBlocksByDefault = foldAllBlocksByDefaultCheckbox.isSelected @@ -140,6 +147,7 @@ class PluginConfigurable : Configurable { PluginSettings.instance.colorNestedPreprocessorCommentsOnlyOnSameIndent = colorNestedPreprocessorCommentsOnlyOnSameIndentCheckbox.isSelected PluginSettings.instance.inspectionHighlightContentNotMatchingIfIndents = inspectionHighlightContentNotMatchingIfIndentsCheckbox.isSelected PluginSettings.instance.inspectionRequireJavaKotlinSpacingInConditions = inspectionRequireJavaKotlinSpacingInConditionsCheckbox.isSelected + PluginSettings.instance.hideMissingFiles = hideMissingFilesCheckbox.isSelected } override fun reset() { @@ -153,5 +161,6 @@ class PluginConfigurable : Configurable { colorNestedPreprocessorCommentsOnlyOnSameIndentCheckbox.isSelected = PluginSettings.instance.colorNestedPreprocessorCommentsOnlyOnSameIndent inspectionHighlightContentNotMatchingIfIndentsCheckbox.isSelected = PluginSettings.instance.inspectionHighlightContentNotMatchingIfIndents inspectionRequireJavaKotlinSpacingInConditionsCheckbox.isSelected = PluginSettings.instance.inspectionRequireJavaKotlinSpacingInConditions + hideMissingFilesCheckbox.isSelected = PluginSettings.instance.hideMissingFiles } } \ No newline at end of file diff --git a/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginSettings.kt b/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginSettings.kt index eb7b311..8e114ea 100644 --- a/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginSettings.kt +++ b/src/main/kotlin/org/polyfrost/intelliprocessor/config/PluginSettings.kt @@ -19,6 +19,7 @@ class PluginSettings : PersistentStateComponent { var colorNestedPreprocessorCommentsOnlyOnSameIndent = false var inspectionHighlightContentNotMatchingIfIndents = true var inspectionRequireJavaKotlinSpacingInConditions = false + var hideMissingFiles: Boolean = false override fun getState(): PluginSettings = this @@ -33,6 +34,7 @@ class PluginSettings : PersistentStateComponent { this.colorNestedPreprocessorCommentsOnlyOnSameIndent = state.colorNestedPreprocessorCommentsOnlyOnSameIndent this.inspectionHighlightContentNotMatchingIfIndents = state.inspectionHighlightContentNotMatchingIfIndents this.inspectionRequireJavaKotlinSpacingInConditions = state.inspectionRequireJavaKotlinSpacingInConditions + this.hideMissingFiles = state.hideMissingFiles } companion object { diff --git a/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFile.kt b/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFile.kt index 0590ecf..c689631 100644 --- a/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFile.kt +++ b/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFile.kt @@ -1,7 +1,25 @@ package org.polyfrost.intelliprocessor.utils +import com.intellij.codeInspection.InspectionManager +import com.intellij.codeInspection.LocalInspectionTool +import com.intellij.codeInspection.ProblemDescriptor +import com.intellij.openapi.Disposable +import com.intellij.openapi.application.ReadAction +import com.intellij.openapi.project.Project +import com.intellij.openapi.vfs.VfsUtil +import com.intellij.profile.codeInspection.InspectionProjectProfileManager +import com.intellij.psi.PsiClass +import com.intellij.psi.PsiFile +import com.intellij.psi.PsiJavaFile +import com.intellij.psi.PsiManager +import com.intellij.psi.util.PsiTreeUtil +import com.intellij.util.concurrency.AppExecutorUtil +import com.intellij.util.io.await +import kotlinx.coroutines.withTimeoutOrNull import org.polyfrost.intelliprocessor.utils.PreprocessorVersion.Companion.preprocessorVersion import java.nio.file.Path +import kotlin.io.path.exists +import kotlin.time.Duration.Companion.milliseconds data class SourceSetFile( val sourceSetName: String, @@ -16,18 +34,22 @@ data class SourceSetFile( Path.of("versions", it, "src", sourceSetName, language).resolve(classPath) } - val isNonGenerated = this.subVersion == null || - overridePath?.let { rootDirectory.resolve(it).toFile().exists() } == true + val isSrc = subVersion == null - fun toRelativePath(): Path { - return if (subVersion == null) { + val isNonGenerated = isSrc || overridePath?.let { rootDirectory.resolve(it).toFile().exists() } == true + + private val relativePath: Path = + if (isSrc) { Path.of("src", sourceSetName, language).resolve(classPath) } else if (isNonGenerated) { overridePath!! } else { Path.of("versions", subVersion, "build", "preprocessed", sourceSetName, language).resolve(classPath) } - } + + val absolutePath: Path = rootDirectory.resolve(relativePath) + + val exists = absolutePath.exists() var metOpeningCondition = true @@ -35,14 +57,87 @@ data class SourceSetFile( val version = displayVersion.preprocessorVersion ?: PreprocessorVersion.NULL - override fun toString(): String { + private val string = run { val displayFile = classPath.last() - val srcMark = if (subVersion == null) "(main)" - else if (isNonGenerated) "(override)" - else "" + val srcMark = if (isSrc) "(main src)" + else if (isNonGenerated) "(override src)" + else "" // e.g. [12102fabric] | 1.21.2-fabric | MyClass.java (main) - return "[${version.mc}${version.loader}] | $displayVersion | $displayFile $srcMark" + "[${version.mc}${version.loader}] | $displayVersion | $displayFile $srcMark" } + override fun toString(): String = string + + @Volatile + private var foundMixinErrors = false + fun hasMixinErrors() = foundMixinErrors + + /** + * Mixin inspections from the MCDev plugin aren't issues that will fail a build. + * So lets find and highlight them in the file jump list, saves crawling through each version looking for them + */ + suspend fun findMixinErrors(project: Project, disposable: Disposable) { + val problems: List? = withTimeoutOrNull(5000.milliseconds) { + val start = System.currentTimeMillis() + ReadAction.nonBlocking?> { + val virtualFile = VfsUtil.findFile(absolutePath, false) + ?: return@nonBlocking null + + val psiFile = PsiManager.getInstance(project) + .findFile(virtualFile) + ?: return@nonBlocking null + + if (!psiFile.isMixinClass()) { + return@nonBlocking null + } + + val mixinInspections = InspectionProjectProfileManager + .getInstance(project) + .currentProfile + .getInspectionTools(psiFile) + .filter { it.groupPath.contains("Mixin") } + + val manager = InspectionManager.getInstance(project) + + mixinInspections.flatMap { wrapper -> + val tool = wrapper.tool as? LocalInspectionTool + ?: return@flatMap emptyList() + + tool.processFile(psiFile, manager) + } + } + .expireWith(disposable) + // Probably redundant with the withTimeoutOrNull() above, but better to be safe + .expireWhen { System.currentTimeMillis() - start > 5000 } + .submit(AppExecutorUtil.getAppExecutorService()) + .await() + } + + foundMixinErrors = problems?.any { + val description = it.descriptionTemplate + description.contains("resolve", ignoreCase = true) || + description.contains("missing", ignoreCase = true) || + description.contains("invalid", ignoreCase = true) || + description.contains("no possible", ignoreCase = true) || + + // Cant just match "does not match" for these 2 as it would also catch the harmless "local / param name does not match" + description.contains("@Local does not match", ignoreCase = true) || + description.contains("signature does not match", ignoreCase = true) + } ?: false + } +} + +private fun PsiFile.isMixinClass(): Boolean { + if (this !is PsiJavaFile && fileType.name != "JAVA") { + return false + } + + return PsiTreeUtil.collectElementsOfType(this, PsiClass::class.java) + .any { + it.annotations.any { annotation -> + annotation.qualifiedName == "org.spongepowered.asm.mixin.Mixin" + || annotation.nameReferenceElement?.referenceName == "Mixin" + } + } } diff --git a/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFileDialog.kt b/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFileDialog.kt index dbce09a..7c47096 100644 --- a/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFileDialog.kt +++ b/src/main/kotlin/org/polyfrost/intelliprocessor/utils/SourceSetFileDialog.kt @@ -1,7 +1,11 @@ package org.polyfrost.intelliprocessor.utils +import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.ModalityState import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.util.Disposer +import com.intellij.platform.ide.progress.withBackgroundProgress import com.intellij.ui.CollectionListModel import com.intellij.ui.DocumentAdapter import com.intellij.ui.JBColor @@ -9,15 +13,26 @@ import com.intellij.ui.SearchTextField import com.intellij.ui.components.CheckBox import com.intellij.ui.components.JBList import com.intellij.ui.components.JBScrollPane +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.joinAll +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Semaphore +import kotlinx.coroutines.sync.withPermit import org.polyfrost.intelliprocessor.config.PluginSettings import java.awt.BorderLayout -import java.awt.Component +import java.awt.Color import java.awt.Font import java.awt.GridLayout import java.awt.event.KeyAdapter import java.awt.event.KeyEvent import java.awt.event.MouseAdapter import java.awt.event.MouseEvent +import java.awt.event.WindowAdapter +import java.awt.event.WindowEvent +import javax.swing.BoxLayout import javax.swing.DefaultListCellRenderer import javax.swing.JComponent import javax.swing.JLabel @@ -31,7 +46,7 @@ class SourceSetFileDialog( sourceFilesUnsorted: List, private val hadConditions: Boolean, private val onFileChosen: (SourceSetFile) -> Unit, -) : DialogWrapper(project) { +) : DialogWrapper(project, true, IdeModalityType.MODELESS) { // Sort entries via int version as 1.8.9 will order before 1.12.2 otherwise private val sourceFiles = sourceFilesUnsorted.sortedBy { it.version.mc } @@ -39,7 +54,7 @@ class SourceSetFileDialog( private val listModel = CollectionListModel(sourceFiles) private val list = JBList(listModel).apply { selectionMode = ListSelectionModel.SINGLE_SELECTION - cellRenderer = ListCellRenderer { list, value, index, isSelected, cellHasFocus -> + cellRenderer = ListCellRenderer { list, value, index, isSelected, cellHasFocus -> // Use DefaultListCellRenderer to get selection colors etc fun String.label() = DefaultListCellRenderer().getListCellRendererComponent( list, @@ -48,14 +63,26 @@ class SourceSetFileDialog( isSelected, cellHasFocus ).apply { + @Suppress("UseJBColor") + fun Color.fadeTo(other: Color, strength: Float) = Color( + red + ((other.red - red) / strength).toInt(), + green + ((other.green - green) / strength).toInt(), + blue + ((other.blue - blue) / strength).toInt(), + ) + // Further differentiate preprocessed generated files with font style - (value as? SourceSetFile)?.let { - if (it.isNonGenerated) { - font = font.deriveFont(Font.BOLD) - } - if (!it.metOpeningCondition) { - foreground = JBColor.GRAY - } + if (value.isNonGenerated) { + font = font.deriveFont(Font.BOLD) + foreground = if (value.isSrc) JBColor.GREEN else JBColor.CYAN + } + if (!value.exists || value.hasMixinErrors()) { + foreground = JBColor.RED.fadeTo(foreground, 2f) + } + if (!value.metOpeningCondition) { + foreground = foreground.fadeTo(JBColor.GRAY, 1.2f) + } + if (value.hasMixinErrors()) { + background = JBColor.RED.fadeTo(background, 1.2f) } } @@ -65,7 +92,13 @@ class SourceSetFileDialog( add(" ${stringParts[0]}".label()) add("| ${stringParts[1]}".label()) }) - add("| ${stringParts[2]}".label()) + if (value.exists) { + add("| ${stringParts[2]}".label()) + if (value.hasMixinErrors()) toolTipText = "File has Mixin inspection errors, likely caused by version differences." + } else { + add("| (File not found)".label()) + toolTipText = "File doesn't exist (but should), run a 'preprocessCode' or 'build' task to generate." + } } } @@ -105,9 +138,49 @@ class SourceSetFileDialog( }) } + private val messagePanel = JPanel().apply { layout = BoxLayout(this, BoxLayout.Y_AXIS) } + private val errorLabel = + " - Some files contained mixin parsing issues (ones that do not fail builds), and have been highlighted RED.".messageLabel() + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO) + init { title = "Select Preprocessed Source File" init() + Disposer.register(disposable) { scope.cancel() } + + scope.launch { + withBackgroundProgress(project, "Finding Mixin Errors") { + // Check files concurrently, but limit how many inspection passes run at once + val permits = Semaphore(MAX_CONCURRENT_MIXIN_SCANS) + sourceFiles.filter { it.exists }.map { file -> + launch { + permits.withPermit { file.findMixinErrors(project, disposable) } + if (file.hasMixinErrors()) { + ApplicationManager.getApplication().invokeLater({ onMixinErrorsFound(file) }, ModalityState.any()) + } + } + }.joinAll() + } + } + + window.addWindowListener(object : WindowAdapter() { + override fun windowDeactivated(e: WindowEvent?) { + doCancelAction() + } + }) + } + + private fun onMixinErrorsFound(file: SourceSetFile) { + if (isDisposed) return + listModel.contentsChanged(file) + if (errorLabel.parent == null) { + messagePanel.add(errorLabel, 0) + messagePanel.isVisible = true + messagePanel.revalidate() + messagePanel.repaint() + // Grow the dialog if the new message doesn't fit + if (window.height < window.preferredSize.height) pack() + } } // Focus the search field when the dialog is first opened, streamlines keyboard navigation @@ -124,46 +197,59 @@ class SourceSetFileDialog( panel.add(search, BorderLayout.NORTH) panel.add(JBScrollPane(list), BorderLayout.CENTER) - bottomPanelOrNull()?.let { - panel.add(it, BorderLayout.SOUTH) - } + panel.add(populateMessagePanel(), BorderLayout.SOUTH) filterList() return panel } - private fun bottomPanelOrNull(): JPanel? { - fun String.label(): JLabel = JLabel(this).apply { - font = font.deriveFont(Font.ITALIC, 12f) - foreground = JBColor.GRAY - } + private fun String.messageLabel(): JLabel = JLabel(this).apply { + font = font.deriveFont(Font.ITALIC, 12f) + foreground = JBColor.GRAY + } - val belowList = mutableListOf() - if (sourceFiles.any { it.subVersion != null && it.isNonGenerated }) { - belowList.add(" - (override) files are, non-generated, override files present in the versions//src/ directory.".label()) - } - if (!hadConditions) { - belowList.add(" - No preprocessor conditions were found to apply at the caret position to test results with. Showing all.".label()) - } else if (sourceFiles.any { !it.metOpeningCondition }) { - val hide = PluginSettings.instance.hideUnmatchedVersions - val hideText = - " - Results that do not meet the preprocessor conditions at the caret position have been hidden." - val showText = - " - Faded results are those that do not meet the preprocessor conditions at the caret position." - val label = (if (hide) hideText else showText).label() - belowList.add(label) - belowList.add(CheckBox("Hide results that do not meet preprocessor conditions at caret", hide).apply { - addActionListener { - PluginSettings.modify { hideUnmatchedVersions = isSelected } - label.text = if (isSelected) hideText else showText - filterList() - } - }) - } + private fun populateMessagePanel(): JPanel { + return messagePanel.apply { + if (sourceFiles.any { it.hasMixinErrors() }) { + add(errorLabel) + } + + if (sourceFiles.any { !it.isSrc && it.isNonGenerated }) { + add(" - (override src) files are, non-generated, override files present in the versions//src/ directory.".messageLabel()) + } - return if (belowList.isEmpty()) null else JPanel(GridLayout(belowList.size, 1)).apply { - for (below in belowList) { - add(below, BorderLayout.NORTH) + if (sourceFiles.any { !it.exists }) { + val hide = PluginSettings.instance.hideMissingFiles + val label = " - Some files were not found in the expected directory, run a 'preprocessCode' or 'build' task to generate them.".messageLabel() + add(label) + add(CheckBox("Hide (File not found) results.", hide).apply { + addActionListener { + PluginSettings.modify { hideMissingFiles = isSelected } + filterList() + } + }) } + + if (!hadConditions) { + add(" - No valid preprocessor conditions were found to apply at the caret position to test results with. Showing all.".messageLabel()) + } else if (sourceFiles.any { !it.metOpeningCondition }) { + val hide = PluginSettings.instance.hideUnmatchedVersions + val hideText = + " - Results that do not meet the preprocessor conditions at the caret position have been hidden." + val showText = + " - Faded results are those that do not meet the preprocessor conditions at the caret position." + val label = (if (hide) hideText else showText).messageLabel() + add(label) + add(CheckBox("Hide results that do not meet preprocessor conditions at caret.", hide).apply { + addActionListener { + PluginSettings.modify { hideUnmatchedVersions = isSelected } + label.text = if (isSelected) hideText else showText + filterList() + } + }) + } + + // Hidden until there is something to show, the mixin error message may still be added later + isVisible = componentCount > 0 } } @@ -172,7 +258,9 @@ class SourceSetFileDialog( listModel.replaceAll(sourceFiles.filter { it.toString().lowercase().contains(filter) // Hide entries that do not meet the opening condition if the setting is enabled - && (!PluginSettings.instance.hideUnmatchedVersions || it.metOpeningCondition) + && (!PluginSettings.instance.hideUnmatchedVersions || it.metOpeningCondition) + // Hide entries that do not exist if the setting is enabled + && (!PluginSettings.instance.hideMissingFiles || it.exists) }) if (listModel.isEmpty) { @@ -189,4 +277,8 @@ class SourceSetFileDialog( super.doOKAction() } + private companion object { + const val MAX_CONCURRENT_MIXIN_SCANS = 4 + } + } From b1c315628540fb06818106b0b54b33e5b995beaf Mon Sep 17 00:00:00 2001 From: Traben Date: Wed, 25 Nov 2026 11:05:25 +1000 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b7e65..41ce75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ # IntelliProcessor Changelog ## [Unreleased] + +### Updated + - Various improvements to the "jump to preprocessed file" action, including: - Added an optional settings to hide missing files - Improved visibility for: missing files, override files, the main file. From 2f142ebb307b62c2907e5fb87b5ef2a1f93d639a Mon Sep 17 00:00:00 2001 From: Traben Date: Wed, 25 Nov 2026 11:07:01 +1000 Subject: [PATCH 3/4] bump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 163f259..6b51d6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ plugin.group=org.polyfrost.sorbet.intelliprocessor plugin.name=IntelliProcessor -plugin.version=4.2.0 +plugin.version=4.3.0 plugin.repository.url=https://github.com/Traben-0/IntelliProcessor gradle.version=8.11.1 From 04b11332d7a0c99e44d58d22f037b3335a4c39b8 Mon Sep 17 00:00:00 2001 From: Traben Date: Wed, 25 Nov 2026 11:55:22 +1000 Subject: [PATCH 4/4] fix plugin verification --- build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 22bc09f..7888429 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -127,6 +127,10 @@ intellijPlatformTesting { extensions.configure { jvmToolchain(21) + compilerOptions { + // IntelliJ 2024.3 bundles Kotlin stdlib 2.0.x + apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) + } } tasks {