Closed Vlatombe closed 1 year ago
I think it is a good idea to compare the File Type, but I think it'll be better to keep it typesafe and compare it with FileType
instances. I'll doodle a bit to figure out the approach.
Maybe I am overthinking it, but I want to add a Groovy plugin as an optional dependency.
I made it work which made me realise that it'll lead to groovy views showing up only when Groovy plugin is installed. So this should probably be just right. Maybe using file extensions will make it closer to stapler itself 🤔
Well, this implementation doesn't work if the Groovy plugin is not installed. Without the plugin, there is no "Groovy" file type.
@timja can you give your two cents?
Does this assume all groovy files could be views?
No strong opinions on this, generally I convert groovy views to jelly if I have to do anything nontrivial on them. We don't really recommend groovy views for new code.
Does this assume all groovy files could be views?
All groovy files in a package that has the same name as fully qualified name of a class for which structure view is constructed
Does this assume all groovy files could be views?
All groovy files in a package that has the same name as fully qualified name of a class for which structure view is constructed
ok so sounds safe enough