fredyvonvinet / ANTLR4-Plugins-for-NetBeans

NetBeans plugins for ANTLR 4 enabling to integrate ANTLR grammar files in standard NetBeans projects (ant-based or Maven-based).
9 stars 11 forks source link

Please add an action to grammar files to generate on the fly #42

Open Chris2011 opened 7 years ago

Chris2011 commented 7 years ago

I know you wrote about the best practice to create a separate project for the grammar generate stuff and so on, but the real world looks different. Atm I'm working on a plugin which is a fork from Cetriolo (Cucumber for NetBeans). So I forked it and I want to add the new ANTLRv4 runtime lib. The project already has the g files and now I don't want to create a extra project copy the files to this and so on. This is awkward for projects that still have the grammar files inside of the project. I think this happens often. So for me it would be very very handy to have an action directly on the file node of the .g4 file to generate all what is needed.

I tried it in I think Visual Studio Code or IntelliJ and it works really nice. You open the file, right click in the file and choose Generate ANTLR Recognizer. So for me it is a must have to have 2 actions. One action on each grammar file and one action if you opened such file to do it directly inside the file.

Regards

Chris