|
7 | 7 | import com.intellij.execution.configurations.GeneralCommandLine; |
8 | 8 | import com.intellij.execution.process.CapturingProcessHandler; |
9 | 9 | import com.intellij.execution.process.ProcessOutput; |
10 | | -import com.intellij.notification.Notification; |
11 | 10 | import com.intellij.notification.NotificationType; |
12 | | -import com.intellij.notification.Notifications; |
13 | 11 | import com.intellij.openapi.editor.Document; |
14 | 12 | import com.intellij.openapi.progress.EmptyProgressIndicator; |
15 | 13 | import com.intellij.openapi.progress.ProcessCanceledException; |
@@ -69,10 +67,9 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile |
69 | 67 |
|
70 | 68 | if (VERBOSE_LOG) { |
71 | 69 | // TODO: provide XML output via a "Show Cppcheck output" action - event log messages are truncated |
72 | | - Notifications.Bus.notify(new Notification("Cppcheck", |
73 | | - "Cppcheck execution output for " + psiFile.getName(), |
| 70 | + CppcheckNotification.send("execution output for " + psiFile.getName(), |
74 | 71 | cppcheckOutput, |
75 | | - NotificationType.INFORMATION)); |
| 72 | + NotificationType.INFORMATION); |
76 | 73 | } |
77 | 74 |
|
78 | 75 | final List<ProblemDescriptor> descriptors = new ArrayList<>(); |
@@ -160,10 +157,9 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile |
160 | 157 |
|
161 | 158 | // Cppcheck error |
162 | 159 | if (lineNumber <= 0 || lineNumber > document.getLineCount()) { |
163 | | - Notifications.Bus.notify(new Notification("Cppcheck", |
164 | | - "Cppcheck line number out-of-bounds " + i, |
| 160 | + CppcheckNotification.send("line number out-of-bounds " + i, |
165 | 161 | id + " " + severity + " " + inconclusive + " " + errorMessage + " " + fileName + " " + lineNumber + " " + column, |
166 | | - NotificationType.ERROR)); |
| 162 | + NotificationType.ERROR); |
167 | 163 | continue; |
168 | 164 | } |
169 | 165 |
|
|
0 commit comments