Search in sources :

Example 1 with ValgrindInfo

use of org.eclipse.linuxtools.internal.valgrind.core.ValgrindInfo in project linuxtools by eclipse.

the class ValgrindLaunchConfigurationDelegate method parseLogs.

protected IValgrindMessage[] parseLogs(IPath outputPath) throws IOException, CoreException {
    List<IValgrindMessage> messages = new ArrayList<>();
    for (File log : outputPath.toFile().listFiles(LOG_FILTER)) {
        ValgrindCoreParser parser = new ValgrindCoreParser(log, launch);
        IValgrindMessage[] results = parser.getMessages();
        if (results.length == 0) {
            results = new IValgrindMessage[1];
            // $NON-NLS-1$
            results[0] = new ValgrindInfo(null, Messages.getString("ValgrindOutputView.No_output"), launch);
        }
        messages.addAll(Arrays.asList(results));
        createMarkers(results);
    }
    return messages.toArray(new IValgrindMessage[messages.size()]);
}
Also used : IValgrindMessage(org.eclipse.linuxtools.valgrind.core.IValgrindMessage) ValgrindInfo(org.eclipse.linuxtools.internal.valgrind.core.ValgrindInfo) ArrayList(java.util.ArrayList) ValgrindCoreParser(org.eclipse.linuxtools.internal.valgrind.core.ValgrindCoreParser) IFile(org.eclipse.core.resources.IFile) File(java.io.File)

Aggregations

File (java.io.File)1 ArrayList (java.util.ArrayList)1 IFile (org.eclipse.core.resources.IFile)1 ValgrindCoreParser (org.eclipse.linuxtools.internal.valgrind.core.ValgrindCoreParser)1 ValgrindInfo (org.eclipse.linuxtools.internal.valgrind.core.ValgrindInfo)1 IValgrindMessage (org.eclipse.linuxtools.valgrind.core.IValgrindMessage)1