External plugin file types are not registered in tests with latest plugin template

Hi,

I’ve created a new Github repo from the latest intellij-platform-plugin-template and I’m trying to bring in the Cucumber plugin (gherkin) as a dependency, however the file type provided by it is not getting registered in tests.

The only changes I made to the template:

settings.gradle.kts

  • updated the kotlin and platform settings versions
id("org.jetbrains.kotlin.jvm") version "2.3.20"

id("org.jetbrains.intellij.platform.settings") version "2.17.0"

build.gradle.kts

  • set the IDE version, and added the necessary plugin and module
intellijIdea("2026.1")

plugin("gherkin:261.22158.182")
bundledModule("intellij.platform.langInjection")

plugin.xml

  • added the necessary <depends> tags
<depends>com.intellij.modules.platform</depends>
<depends>gherkin</depends>
<depends>org.intellij.intelliLang</depends>

The following simple test fails, and the file is recognized as PlainTextFileType:

import com.intellij.testFramework.fixtures.BasePlatformTestCase
import org.jetbrains.plugins.cucumber.psi.GherkinFileType

class FileTypeTest : BasePlatformTestCase() {

    fun testFileType() {
        val file = myFixture.configureByText(GherkinFileType.INSTANCE, "")

        assertEquals(GherkinFileType.INSTANCE, file.fileType)
    }
}

Some more details:

  • The Gherkin file type is registered when I run the sandbox IDE.
  • I tried the test with the JBehave Support and the D language support plugin and their file type are not registered either in tests with this configuration. (FileTypeManager doesn’t return them either.)
  • I know this might not only be related to file types but I haven’t tried it with other areas.

I’m kind of clueless as to what configuration I might be missing, so any pointers would be appreciated.

Hi @picimako! See the workaround at https://youtrack.jetbrains.com/issue/IJPL-247343/FileTypeManager.getFileTypeByExtension-returns-UnknownFileType. I had a similar problem. I hope it helps.

Thanks @kolchinmax for the hint!

When building on 2026.1 it is testBundledPlugin("com.intellij.modules.json") that seems to solve the problem.

I did not see any indication of the json plugin in the test logs with 2026.1 that it might be missing. It is only when building on 2026.2 EAP that it says that the Gherkin plugin depends on the JSON one but the latter is missing.

For 262.8665.81-EAP, based on the indication of ‘not installed’ plugins in the test logs, the following should fix it, but they don’t:

testBundledPlugin("com.intellij.modules.json")
testBundledModule("intellij.platform.structureView")

The test still complains on the latter: Plugin 'Gherkin' (gherkin) has dependency on 'intellij.platform.structureView' which is not installed

For this I’ll just wait for https://youtrack.jetbrains.com/issue/IJPL-248701/Plugins-test-does-not-start-on-2026.2 to be fixed in the platform gradle plugin.