Search in sources :

Example 1 with Issue

use of org.infernus.idea.checkstyle.csapi.Issue in project checkstyle-idea by jshiell.

the class CheckStyleAuditListener method toIssue.

private Issue toIssue(final AuditEvent auditEvent) {
    String msg = auditEvent.getMessage();
    final SeverityLevel level = readSeverityLevel(auditEvent.getSeverityLevel());
    return new Issue(auditEvent.getFileName(), auditEvent.getLine(), auditEvent.getColumn(), msg, level, auditEvent.getSourceName());
}
Also used : SeverityLevel(org.infernus.idea.checkstyle.csapi.SeverityLevel) Issue(org.infernus.idea.checkstyle.csapi.Issue)

Example 2 with Issue

use of org.infernus.idea.checkstyle.csapi.Issue in project checkstyle-idea by jshiell.

the class CheckStyleAuditListener method auditFinished.

public void auditFinished(final AuditEvent auditEvent) {
    List<Issue> errorsCopy;
    synchronized (errors) {
        errorsCopy = new ArrayList<>(errors);
    }
    final ProcessResultsThread findThread = new ProcessResultsThread(suppressErrors, checks, tabWidth, baseDir, errorsCopy, fileNamesToPsiFiles);
    final Application application = ApplicationManager.getApplication();
    if (application != null) {
        // can be null in unit tests
        application.runReadAction(findThread);
        problems = findThread.getProblems();
    }
}
Also used : Issue(org.infernus.idea.checkstyle.csapi.Issue) ProcessResultsThread(org.infernus.idea.checkstyle.csapi.ProcessResultsThread) Application(com.intellij.openapi.application.Application)

Aggregations

Issue (org.infernus.idea.checkstyle.csapi.Issue)2 Application (com.intellij.openapi.application.Application)1 ProcessResultsThread (org.infernus.idea.checkstyle.csapi.ProcessResultsThread)1 SeverityLevel (org.infernus.idea.checkstyle.csapi.SeverityLevel)1