-listener preference not working #137
Comments
Moving the grammar file from the top level folder of the project to a subfolder (package) resolves this issue.. |
-visitor setting is also ignored, regardless of where the .g4 file is located in the project. |
This is the same issue as #143. I will look into this when I get the chance. |
Can you try to reproduce this with v0.3.7. |
Just so we are clear: 0.3.7 is identical to 0.3.6 codewise at the moment. On Thu, Nov 10, 2016 at 11:27 AM, HSorensen notifications@github.com
|
@arifogel Thanks btw for stepping up here! |
So I discovered there is a problem when ANTLR4IDE rebuilds the full project that might relate to the observations mentioned in this issue.
The testissue.g4 grammar has: grammar testissue;
import A; When changing the project specific tool settings the following rebuilds are done:
Note the different -listener and -visitor options used by the two different invocations. They should have been the same as the project specific setting (-listener and -visitor). Something is wrong here. |
I can confirm this bug using the described steps above. |
After doing some research on this issue, I would guess that the problem is that com.github.jknack.antlr4ide.ui.generator.DefaultToolOptionsProvider iterates through all Eclipse launch configurations at line 85. Can you please provide your launch configurations, so that I can ensure that my observation is correct (in Eclipse right-click in the Package Explorer at a .g4 file and select run-as -> external tool configuratioins and list the configurations under ANTLR with the grammar and the arguments)? Also, I would like to know if it is using the right settings if you manually delete the corresponding launch configurations. |
I noticed I had an external run config for one file in my project. This config was used when building the project. After removing that config I can not reproduce the issue. |
I don't use the listener so I disabled the checkbox for generating a listener on the ANTLR preference pane:
But it still uses the -listener flag when building a grammar:
The text was updated successfully, but these errors were encountered: