eclemma icon indicating copy to clipboard operation
eclemma copied to clipboard

Select proper Launcher in case of multiple Launchers

Open marchof opened this issue 10 years ago • 5 comments

If additional launchers are configured EclEmma seems to delegate to a random one which leads to unexpected results. See forum posts: https://groups.google.com/forum/?fromgroups=#!topic/jacoco/JP244L-DzbU

marchof avatar Dec 07 '15 05:12 marchof

Is this hard to fix? Where would you start when implementing a fix, if the maintainers don't have enough time to look at it?

kossmoboleat avatar Jan 15 '16 16:01 kossmoboleat

@kossmoboleat I don't think so. If somebody has the chance to study the APIs contributions are welcome. I might find some time to pick this up the next weeks.

marchof avatar Jan 15 '16 17:01 marchof

@marchof Hmm, I don't know anything about Eclipse plugins, but maybe the relevant class is ILaunchConfigurationDelegate?

In the two lines below the first delegate is always chosen, which sounds like the described behavior: https://github.com/jacoco/eclemma/blob/fb939e062205fc64c419ea36604a3fdc5ae03e8c/com.mountainminds.eclemma.core/src/com/mountainminds/eclemma/core/launching/CoverageLauncher.java#L71-L72

I guess a good first default would be the normal JDT launcher, if there are only two launchers instead of something more specific like a VisualVM launcher. You usually don't want to profile and measure coverage at the same time...

kossmoboleat avatar Jan 16 '16 10:01 kossmoboleat

@kossmoboleat Yep, that looks reasonable. Now we need a strategy to select the "correct" launcher for all 9 launch types we currently support. So the task is to identify the correct launcher IDs

org.eclipse.debug.core.ILaunchDelegate.getId()

and add a new attribute for the CoverageLauncher.

marchof avatar Jan 18 '16 19:01 marchof

any news on a fix for this bug? I am encountering it as well and the only workaround right now is to uninstall the additional launchers.

wiwie avatar Sep 03 '16 07:09 wiwie