Add support for coverage filters
Brought to you by:
mtnminds
I have implemented an extension point to allow plugins to extend EclEmma with filters which exclude parts of the coverage report.
The purpose I have in mind is a filter which excludes coverage data for blocks of code which are unchanged according to Subversion.
I have attached diffs for the changes to eclemma.core and eclemma.ui. I can share the subversion filter if necessary but it is still in development.
Please note that I have updated the core diff to include a couple of fixes.
Hallo Martin,
many thanks for your filter extension! I will definitely have a look at it and see how it can be adopted for EclEmma.
Very sorry for the delayed answer,
-marc
One idea which I have had since I posted these diffs was that ICoverageFilter.isFiltered(...) should perhaps be extended to also include an IProgressMonitor argument to allow filters to give UI feedback on their progress.
Since I submitted my original diffs I have found some more bugs in my code which matches method coverage descriptors to java elements.
As a result, I've pulled out this part into a new class MethodMatcher and added some UTs to the eclemma UT project to check that its working properly in all the edge cases.
Updated diffs are attached.
I have made further changes including fixing a bug in core EclEmma relating to loading coverage for inner classes. Updated diffs have been attached to this tracker,
Hi Martin,
I just had a very quick look and realized that this patch introduces a dependency from eclemma.core to eclipse.ui which is problematic for headless usage of EclEmma (e.g. in buckminster).
Please also consider contributing your requirements to our new project "JaCoCo" (see http://www.eclemma.org/jacoco/\) as we will most likely move to this new coverage backend for EclEmma in future. Filtering should then be a feature of the coverage technology itself, not of the GUI.
Best regards,
-marc
Hi Marc,
I have done a quick fix to remove the dependency on eclipse.ui.
I am happy to contribute to the JaCoCo project at some point in the future but for now I am focusing on EclEmma as this is already mature.
Let me know if you have any more feedback about my proposed changes.
MartinHR
*bump* - Any idea when this patch might get reviewed?
*bump* - Any idea when this patch might get reviewed?
Hi Martin,
can you please double check that the latest patch is consistent or give some advice which patches should be applied? I get several compile errors e.g. when I apply the patch to the core.
Please make sure that the patch works with EclEmma minimum system requirements, which is Eclipse 3.1 and Java 1.4.
Best regards,
-marc
Thanks for the feedback. I'll take a look in the next few days to make sure the diffs are in a sensible state.
Hi marc,
I have attached a new set of patches against the current trunk revision of eclemma. Can you try using these patches and let me know if you still hit any errors. In particular, it would be very useful if you could post the full details of any errors that you hit.
Thanks
Martin
Hallo Martin,
it stil doesn't look like your patch works with the EclEmma minimum system
requirements. See errors for the core plugin attached.
Please always make sure you set a Eclipse 3.1 distribution as your target and have a JRE 1.4 as your default JRE.
-marc