Frequently Asked Questions

Usage

Troubleshooting

Installation

Usage

How can I remove the coverage coloring from the Java editors again?

If you remove the coverage session, also the coverage coloring will disappear. For this, hit Remove Session or Remove All Sessions in the Coverage view's toolbar.

Why can't I select source folders separately for instrumentation?

EMMA works on Java class files. If source folders have the same output location, only all or none of them can be selected for instrumentation. If you want to select them individually please specify a different output location for each source folder. This can be done in the Java Build Path settings in the project properties. Check Allow output folders on the Source tab and specify different output folders for your source folders (for example bin-src/, bin-test/ etc.).

How can I run {whateverapplication} with EclEmma?

EclEmma is designed for Java programs launched within Eclipse. Java Applications that run in a different environment may be analyzed with the EMMA library directly. There are different supported launch types, other plug-ins may define additional launch types which are not supported by EclEmma. Check user documentation for currently supported launch types.

Does EclEmma support automated Ant builds?

EclEmma is a Eclipse integration of the EMMA code coverage tool. EMMA itself comes with a comprehensive set of Ant tasks and can be used in automated builds. See EMMA documentation for details.

How do I change the source code highlighting?

The source code highlighting can be changed in the Eclipse Preference dialog at General → Appearance → Editors → Text Editors → Annotations. You can modify the highlighting style and color or use the vertical rulers instead.

Why can't I uncheck in-place instrumentation in the launch dialog?

Some launch types require in-place instrumentation as there is no other way to get the instrumented classes into the classpath. In this case the checkbox is disabled and can not be unchecked.

Troubleshooting

I get the error message "No coverage data file has been written". Please help!

This may have several reasons:

Code with exceptions shows no coverage. Why?

The underlying EMMA library works on so called basic blocks. A basic block is a sequence of instructions without any jumps or jump targets. A basic block is marked as executed when it reaches its last instruction. In case of exceptions a basic block is aborted somewhere in the middle and not marked as executed. See EMMA's FAQ for details.

My application does not run with EclEmma!

Does your application properly execute within Eclipse in normal run mode? Please verify! If not, your app will most likely not execute in coverage mode either. In this case first create a proper launch configuration in Eclipse; then execute in coverage mode.

Installation

Does EclEmma work with IBM Rational 6.0 products?

No, these products are based on Eclipse 3.0, EclEmma requires at least Eclipse 3.1. IBM Rational 7.0 products are based on Eclipse 3.2 and may work with EclEmma.