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. (
FileTypeManagerdoesn’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.