tunnelvisionlabs / antlrworks2

Tunnel Vision Labs' ANTLRWorks 2 IDE
http://tunnelvisionlabs.com/products/antlrworks
Other
48 stars 21 forks source link

adding a jar to `TestRigTask`'s classpath? #30

Open yshavit opened 10 years ago

yshavit commented 10 years ago

I have a project (antlr-denter) that provides a helper class to be used in the lexer/parser that antlr generates. It works fine for the actual project, but antlrworks2 can't run the test rig on it, because it can't compile the generated lexer/parser classes:

/tmp/TestRigTask-1395122781850/EffesLexer.java:3: error: package com.yuvalshavit.antlr4 does not exist import com.yuvalshavit.antlr4.DenterHelper; ^ /tmp/TestRigTask-1395122781850/EffesLexer.java:4: error: package com.yuvalshavit.antlr4 does not exist import com.yuvalshavit.antlr4.DenterOptions; etc....

My project is maven'ized, meaning it comes as a convenient jar. If I symlink this jar into antlrworks2/platform/lib (on Linux), the java.class.path property includes the jar. But the TestRigTask still can't find it during compilation.

Digging into the code a bit, it looks like TestRigTask sets the classpath explicitly, and CodeGenerator doesn't look at any system properties (CLASSPATH, etc) when building its classpath.

Do I have any options that don't require code changes? And if a code change is required, would you be amenable to it? Maybe a system property that TestRigTask looks for?