[FEATURE REQUEST] Ability to run the TestRig from within the IDE #140
Comments
What is your proposed workflow for this? Please be more specific. |
In general, an actual pre-existing workflow would have been nice getting into using this IDE. Right now my workflow is a bit silly. I made a console app in another program that asks for the name of the .g4 file and then generates 1) The .g4 file with a simple grammar that builds, 2) an input file with some text that can be parsed by the grammar, and 3) a java class that sets up the lexer and parser and runs the input through them both. I don't make a new project every time I want to make a new grammar, and I am following along with the examples in The Definitive ANTLR 4 Reference and all of my grammars and tests and input are all just dumped into the same project. I'm very new to this, and it took a long time (~8 hours) to set up the IDE. When I say "set up the IDE" I do so within the context of these goals:
I have a proposed workflow: Imagine a new tab (ANTLR TestRig) that appears on the right of the workspace in Eclipse, for example with the Task List or Outline tab. The tab would be divided in half horizontally. In the top section there would be ANTLR test rig options in the form of check boxes and/or radio buttons. There would also be a "Run" button in this section. The bottom half would be divided vertically. The bottom left quadrant would contain a list of all the grammars which were built successfully. The list only supports single selection, and multi-select is disabled. When you click a grammar, a second list appears in the bottom right quadrant with a list of rules. You select a rule from that list, which is also single-select only. You click to select an input file from the project tree on the right side of your workspace in Eclipse. Then you click the run button in the aforementioned tab (ANTLR TestRig) to run that input file against the selected grammar/rule. If multiple input files are selected, then they will all be run against the test rig with the same settings, one after another. Output will be sent to the console as normal. |
@sithys Regarding your points
For the TestRig I'll check if the ParseTree view wasn't supposed to handle this. |
The parse tree is a bit clunky because you can't type in the textbox (the textbox loses focus on grammar errors) Also, the way that you need to put the cursor on a rule in a grammar file is very clunky. The parse tree view should be self-contained. Also, I don't want to have to copy the text from an input file into the parse tree text box. It's just an extra step. |
It would be useful to be able to run the ANTLR4 testrig on an arbitrary input file from within the IDE.
The text was updated successfully, but these errors were encountered: