Hey Jetbrains Team,
I’m super excited that we can now use Kotlin Notebooks for plugin development. What an amazing step forward!
I am trying to create an inspection and an intention. It looks like they are registering correctly with the registerExtension function, but afterwards I am seeing some strange behaviour. I am also not sure if either of them is actually running after being registered.
Thanks in advance for the support!
Inspection
After registering the inspection, no items are shown in the inspections page in settings.
Intention
After registering the intention
- No items are shown in the intentions page in settings
- When clicking
option + enterfor the context actions, nothing shows up
As a new user, I can only upload one attachment at a time, so here is an aggregated screenshot. Before on the left, after on the right
Expected behaviour
Are these extension points supported in kotlin notebooks yet? I would expect that it functions just like the other extensions. Once registered, everything works as per usual, right?
Here are some specifics about the IDE, and the code I am using to reproduce this error.
Product details
Name: IntelliJ IDEA
Version: 2025.2.5
Build Number: 252.28238.7
Code snippets for cells
%use intellij-platform
loadPlugins("org.jetbrains.kotlin")
import com.intellij.codeInspection.LocalInspectionEP
import org.jetbrains.kotlin.idea.codeinsight.api.classic.inspections.AbstractKotlinInspection
class MyNotebookInspection : AbstractKotlinInspection()
val extensionPoint = LocalInspectionEP().apply {
implementationClass = MyNotebookInspection::class.java.name
language = "kotlin"
displayName = "My Maths Inspection"
shortName = "My Maths Inspection"
}
registerExtension("com.intellij.localInspection", extensionPoint)
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInsight.intention.IntentionActionBean
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiFile
class MyNotebookIntention : IntentionAction {
override fun getText(): String = "My Notebook Intention"
override fun getFamilyName(): String = "MyNotebookIntentions"
override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = true
override fun startInWriteAction(): Boolean = true
override fun invoke(project: Project, editor: Editor?, file: PsiFile?) {
println("Intention executed!")
}
}
registerExtension("com.intellij.intentionAction", IntentionActionBean().apply {
className = MyNotebookIntention::class.qualifiedName
category = "Notebook Intentions"
})
Please let me know if you need any more information!
