Skip to content

Detect Frameworks after smart mode ready - #2630

Open
ghostflyby wants to merge 4 commits into
minecraft-dev:devfrom
ghostflyby:detection-index
Open

Detect Frameworks after smart mode ready#2630
ghostflyby wants to merge 4 commits into
minecraft-dev:devfrom
ghostflyby:detection-index

Conversation

@ghostflyby

Copy link
Copy Markdown

A performance improvement.

Use cases of LibraryPresentationProvider by the IDE itself only matches the jar name by regex, proving that they are not intended for file iterations.

Framework kind are useless when the index is not ready.

All tests passed.

closes #2475

@DenWav

DenWav commented Aug 5, 2026

Copy link
Copy Markdown
Member

In concept I like this change, but it is a lot. There's several merges here, can you rebase your branch to get a clean set of commits in this PR?

@DenWav

DenWav commented Aug 5, 2026

Copy link
Copy Markdown
Member

Much nicer, thanks.

@DenWav DenWav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned about handling of CancellationException, but I haven't looked deeply enough into this PR yet, will do so when I get the time.


class AdventurePresentationProvider : LibraryPresentationProvider<DummyLibraryProperties>(ADVENTURE_LIBRARY_KIND) {
override fun getIcon(properties: DummyLibraryProperties?) = PlatformAssets.ADVENTURE_ICON
class AdventureLibraryDetector : MinecraftLibraryDetector {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these classes were renamed to *LibraryDetector, but the file name is still *PresentationProvider. The file name should match in this case.

import com.intellij.psi.JavaPsiFacade
import com.intellij.psi.search.FilenameIndex
import com.intellij.psi.search.GlobalSearchScope
import java.util.*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No wildcard imports please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix frequent “Detecting Minecraft frameworks” with heavy system load.

2 participants