Closed Foodyborris closed 11 months ago
Hi @Foodyborris,
I certainly have no objection to this request, since it is always preferable to include support for standard features provided by an IDE. I did want to let you know about an alternative that is already available. NetBeans includes 3 commands for automatically converting between comments and code:
ANTLRWorks 2 currently provides support for the first two of these. You'll find buttons on the tool bar at the top of the text editor window, as well as the ability to bind them to keyboard shortcuts.
This might be where regret going to NetBeans 8 (8.0.01 to be precise). Under the Source menu is an option called Toggle Comment, with a binding to Ctrl+Slash. When editing Java, this option is selectable. When editing a .g4 file, the option is present but greyed out. I'd guessed this meant the editing mode didn't support the option. I'm going to guess it's not greyed out for you on a .g4 file and that you're still on NB 7 ????
The Toggle Comment menu command is different from the Comment and Uncomment commands. ANTLRWorks 2 already implements support for Comment and Uncomment, but does not implement support for Toggle Comment.
The tool bar buttons for Comment and Uncomment are shown highlighted in the following image. For me, they appear for Java code as well as ANTLR grammar files. If you hover over the buttons, you can see whether or not they are already associated with keyboard bindings.
Ok, I see now. Toggle would be really great, but your nudge has helped me find the buttons accessing the existing functionality. Thanks.
Provide support for the traditional Ctrl-/ action to comment/uncomment a block of lines.