Search in sources :

Example 6 with SetLocation

use of aQute.service.reporter.Reporter.SetLocation in project bndtools by bndtools.

the class MarkerSupport method report.

private void report(Processor reporter, IStatus status) {
    if (status == null || status.isOK())
        return;
    if (status.isMultiStatus()) {
        for (IStatus s : status.getChildren()) report(reporter, s);
    } else {
        SetLocation location;
        Throwable exception = status.getException();
        if (exception != null)
            if (status.getSeverity() == IStatus.ERROR)
                location = reporter.exception(exception, status.getMessage());
            else
                location = reporter.warning(status.getMessage() + ": " + exception);
        else {
            if (status.getSeverity() == IStatus.ERROR) {
                location = reporter.error(status.getMessage());
            } else {
                location = reporter.warning(status.getMessage());
            }
        }
        location.file(reporter.getPropertiesFile().getAbsolutePath());
    }
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) SetLocation(aQute.service.reporter.Reporter.SetLocation)

Aggregations

SetLocation (aQute.service.reporter.Reporter.SetLocation)6 FileLine (aQute.bnd.osgi.Processor.FileLine)2 Attrs (aQute.bnd.header.Attrs)1 Parameters (aQute.bnd.header.Parameters)1 ExtList (aQute.lib.collections.ExtList)1 IProject (org.eclipse.core.resources.IProject)1 IAdaptable (org.eclipse.core.runtime.IAdaptable)1 IStatus (org.eclipse.core.runtime.IStatus)1 IWorkbench (org.eclipse.ui.IWorkbench)1 IWorkingSet (org.eclipse.ui.IWorkingSet)1 IWorkingSetManager (org.eclipse.ui.IWorkingSetManager)1