Thanks.
I checked out a copy of the source instead of just using the jar. I
imported it into exclipse, added the code and wrote a test class
(AaaaTest).
I'm getting an exception
Exception in thread "main" java.util.MissingResourceException: Can't
find bundle for base name
rhino_ast.java.com.google.javascript.rhino.Messages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Unknown
Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at
com.google.javascript.rhino.ScriptRuntime.getMessage(ScriptRuntime.java:
466)
at
com.google.javascript.rhino.ScriptRuntime.getMessage0(ScriptRuntime.java:
423)
at
com.google.javascript.jscomp.RhinoErrorReporter.<init>(RhinoErrorReporter.java:
76)
at
com.google.javascript.jscomp.RhinoErrorReporter.<init>(RhinoErrorReporter.java:
70)
at com.google.javascript.jscomp.RhinoErrorReporter
$OldRhinoErrorReporter.<init>(RhinoErrorReporter.java:137)
at com.google.javascript.jscomp.RhinoErrorReporter
$OldRhinoErrorReporter.<init>(RhinoErrorReporter.java:136)
at
com.google.javascript.jscomp.RhinoErrorReporter.forOldRhino(RhinoErrorReporter.java:
102)
at com.google.javascript.jscomp.Compiler.<init>(Compiler.java:138)
at com.google.javascript.jscomp.Compiler.<init>(Compiler.java:169)
at com.google.javascript.jscomp.AaaaTest.runCompiler(AaaaTest.java:
56)
at com.google.javascript.jscomp.AaaaTest.main(AaaaTest.java:99)
I'm sure I am doing something wrong that is easy to figure out, so I
thought I would post it. I'm no Java expert.
On Jul 2, 11:28 am, John Lenz <
concavel...@gmail.com> wrote:
> Hmmm. Looks like a bit of code didn't make it into the public release, I'll
> get that rectified. For now you will need to add a new pass to
> DefaultPassConfig and add a reference to it:
>
> private final PassFactory printNameReferenceGraph = new
> PassFactory("printNameReferenceGraph", true) { @Override
> protected CompilerPass createInternal(final AbstractCompiler compiler)
> { return new CompilerPass() { @Override
> public void process(Node externs, Node jsRoot) {
> NameReferenceGraphConstruction gc = new
> NameReferenceGraphConstruction(compiler);
> gc.process(externs, jsRoot); String graphFileName =
> options.nameReferenceGraphPath; try {
> Files.write(DotFormatter.toDot(gc.getNameReferenceGraph()),
> new File(graphFileName), Charsets.UTF_8);
> } catch (IOException e) { logger.severe(
> "Error writing compiler report to " + graphFileName);
>
> } } }; } };