GumTreeDiff / gumtree

An awesome code differencing tool
https://github.com/GumTreeDiff/gumtree/wiki
GNU Lesser General Public License v3.0
933 stars 174 forks source link

Registering JsAcornTreeGenerator Cannot resolve symbol 'JsAcornTreeGenerator' #271

Closed intumwa closed 2 years ago

intumwa commented 2 years ago

Hello,

This may sound like a stupid question but I have a hard time figuring out how to register or import the JsAcornTreeGenerator in order to parse JS files. Before that, I tried the default parser TreeGenerators.getInstance().getTree(srcFile).getRoot(); and it gives me the No generator found for file: x.js error.

How can I parse JS files with com.github.gumtreediff.gen.jsacorn; using the default parser TreeGenerators.getInstance().getTree(srcFile).getRoot();?

jrfaller commented 2 years ago

Hi!

I believe you have a class path problem. If the class path is correct you can normally just create a new JsAcornTreeGenerator() and use it?