Display options based on fileName
已回答
Hello,
I want to add options like "Run" and "Debug" which are shown only for certain files like projectDirectory as shown. I want to provide options only when .java files are selected. How do I proceed with it as I will have to do it from a UI thread?

请先登录再写评论。
See https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#overriding-the-anactionupdate-method on how to update availability/enabled status depending on current context information.