Modify JSCoverag not removing comments during instrumentatio

Questions, problems, suggestions, bug reports, and so on.
Post Reply
Guest

Modify JSCoverag not removing comments during instrumentatio

Post by Guest » 2010-12-07 10:05 am

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

Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

Re: Modify JSCoverag not removing comments during instrument

Post by Ed » 2010-12-07 4:15 pm

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.

Guest

Re: Modify JSCoverag not removing comments during instrument

Post by Guest » 2010-12-12 1:02 pm

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 ...

Post Reply