1

I have successfully followed the instructions from amura.cxg's Stackoverflow question/answer on how to setup Eclipse for ANTLR4 (Thanks amura.cxg!).

It works well, my .g4 grammar files are getting run through ANTLR4 fine. One downside is the ANTLR4 plug in has no option for setting the -package argument to the command line, but -listener/-visitor options are present.

My issue is... now I have these cool *.java artifacts as a result of using the plug-in. I want Eclipse to either build them in place, and allow my *.java code at the bottom of the screen to find the *.class files, or have Eclipse auto move/copy them to be sources in the *.java projects below (I don't care as long as it's automated and works).

I'm looking for a way to do this. I would hope I don't have to setup and install MAVEN.

Currently my *.java code which is dependent on the BaseListener.java classes won't build because the classes are not getting built.

ScreenShot (with secrets pixelized)

Thanks!

Community
  • 1
  • 1
Ross Youngblood
  • 502
  • 1
  • 3
  • 16

1 Answers1

0

I started with Linked resources and had some success, but it still wasn't perfect. I found this information from this StackOverFlow Questionwith an answer from srinivasan.

This is the screenshot to create linked resources. This was the method I wanted to understand.

Properties Change

There are two ways to create linked resources. One "add a Folder", this method I tried first, and was not exactly what I wanted, as it created an extra layer and forced the naming of the lcoal folder. By using the Properties tab, I was able to create a local alias for the resource. I think this will ultimately be the solution. I'm still testing it, but I wanted to post my findings so far in case I get too busy to document my progress in learning later. :)

Community
  • 1
  • 1
Ross Youngblood
  • 502
  • 1
  • 3
  • 16