java intentions for custom language extending groovy

I am developing a plugin for easyb which is a groovy DSL for behavior driven development. Because easyb is groovy based I have created an easyb language which extends the groovy language. My thinking in defining this as a new language which extends groovy is that I can provide additional easyb specific editor assistance (code complete, syntax highlighting, code inspections, etc.) in addition to normal support for groovy files which is available in IntelliJ. Since easyb files have a different file extension then groovy files (.story or .specification) I created an easyb file type (extending LanguageFileType) and registered the easyb extensions via a file type loader application component which uses the FileTypeManager to register the associations. All of this seems to work (easyb specs are recognized by intellij and can be run via a custom RunProfileState I created) except that some basic inspections that work for groovy do not work for easyb specs. Specifically, unrecognized types aren't recognized and quick fixed to import or create classes aren't available. Re-assigning easyb file extensions to "Groovy Script and Classes" enables these inspections. How do I enable these common Java/Groovy inspections in my custom language?

Thanks,

Rod

Please sign in to leave a comment.