Page 1 of 1

Modify JSCoverag not removing comments during instrumentatio

Posted: 2010-12-07 10:05 am
by Guest
Hello everybody,

I was working a little bit with JScoverage to get it working with Servoy (which uses JS for the forms ...). Therefore for me it is very important to keep the comments/javadoc of the functions after instrumentation. Till now after instrumentation all comments/javadocs are removed. I looked a little bit arround the source code but didn't find an easy solution.

Any advice on this ?

Schoby

Re: Modify JSCoverag not removing comments during instrument

Posted: 2010-12-07 4:15 pm
by Ed
There is no easy way to do this, since the parser used by JSCoverage does not preserve comments. I'm not sure why you would want to do this? The output of JSCoverage is generally not intended to be human-readable.

Re: Modify JSCoverag not removing comments during instrument

Posted: 2010-12-12 1:02 pm
by Guest
Yes it looks a little bit stupid to insist on the existence of the comments. But the problem is that the used application framework servoy stores some extra information in the comments which were needed to execute the JavaScript inside servoy.
Something like

Code: Select all

 /*
 * @properties={typeid:24,uuid:"8C73546C-A096-4E38-BEFB-82452F3A983"}
 */
Till now I found a dirty workarround with doing some string searches and inserts in instrument-js.cpp - but nothing which is really nice and reliable ...