Search in sources :

Example 1 with CoverBackend

use of org.erlide.cover.core.CoverBackend in project erlide_eclipse by erlang.

the class CoverLaunchConfigurationDelegate method launch.

@Override
public void launch(final ILaunchConfiguration config, final String mode, final ILaunch launch, final IProgressMonitor monitor) throws CoreException {
    try {
        super.launch(config, mode, launch, monitor);
        CoverLaunchData coverData;
        coverData = new CoverLaunchData(config);
        final CoverBackend coverBackend = CoverBackend.getInstance();
        coverBackend.setBackend(backend);
        coverBackend.initialize(coverData);
        coverBackend.runCoverageAnalysis(new CoverRunner());
    } catch (final CoreException e) {
        ErlLogger.error(e);
    } catch (final CoverException e) {
        if (CoverBackend.getInstance().getListeners().isEmpty()) {
            throw new RuntimeException(e.getMessage());
        }
        CoverBackend.getInstance().handleError(e.getMessage());
    }
}
Also used : CoverBackend(org.erlide.cover.core.CoverBackend) CoreException(org.eclipse.core.runtime.CoreException) CoverException(org.erlide.cover.api.CoverException) CoverRunner(org.erlide.cover.core.CoverRunner)

Aggregations

CoreException (org.eclipse.core.runtime.CoreException)1 CoverException (org.erlide.cover.api.CoverException)1 CoverBackend (org.erlide.cover.core.CoverBackend)1 CoverRunner (org.erlide.cover.core.CoverRunner)1