Hi,

the JaCoCo core APIs do not deal with source code at all. If you want to highlight source code you need to load the source files yourself. The JaCoCo reporting package does this for example.

Best regards,
-marc


On 2014-09-16 16:49, ThanhVu Nguyen wrote:
Hi all, I would like to use Jacoco API for my research. I am trying
the API example at
http://www.eclemma.org/jacoco/trunk/doc/examples/java/CoreTutorial.java
to print out the covered/uncovered lines. I have modified the example
so that it takes in a compiled class file and outputs the line
coverage like

Line 1 .. covered
Line 2 ... covered
Line 3 ... uncovered

etc.

However, I would like it to actually show me what the source coe
corresponding to these lines look like. For example

Line 1 (int x = 5;) .. covered
Line 2 (int y = 7;) ... covered

How to do so ? I have compiled the class file with -g debugging
information and also have looked at Jacoco API but can't eem to find
an option.

Thanks,

 --
 You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
 To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
 For more options, visit https://groups.google.com/d/optout [1].


Links:
------
[1] https://groups.google.com/d/optout

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to