Given a list of Notifications, and a criteria to print them (see Diagnostic.Kind), it will iterate
over the list to describe while sorting them in a pretty way. If the list is empty, it will print nothing.
Sample of the output after calling this method for an ERROR scenario:
[ERROR] ***************************************************
The following (4) errors where encountered while compiling:
File: //metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/BaseGroupingConnector.java
1) @Processor parameter cannot be arrays, use List instead.:28
File: //integration-tests/metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/categories/Rest_V1_Category.java
2) Must have one only argument of type MetaDataKey.:32
File: //integration-tests/metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/GroupingConnector.java
3) A @Connect method can only throw a single type of exception. That exception must be ConnectionException.:22
4) @Configurable cannot be applied to field with static modifier.:27
[ERROR] error on execute: An error ocurred while the DevKit was generating Java code. Check the logs for further details.
This method ensures that, in any error scenario, the complete list will be printed in the user's console. This
means that, if an exception is thrown while sorting the errors and make them pretty (by invoking getCompleteNotificationLog(java.util.List, javax.annotation.processing.ProcessingEnvironment, String, String))
the COMPLETE list of errors will be printed in the default way.
Sample of the output after calling this method for an ERROR scenario but with some troubles while printing:
[ERROR] //metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/BaseGroupingConnector.java:28 @Processor parameter cannot be arrays, use List instead.:28
[ERROR] //integration-tests/metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/categories/Rest_V1_Category.java:32 Must have one only argument of type MetaDataKey.:32
[ERROR] //integration-tests/metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/GroupingConnector.java:22 A @Connect method can only throw a single type of exception. That exception must be ConnectionException.:22
[ERROR] //integration-tests/metadata-grouping-types-integration-tests/src/main/java/org/mule/devkit/it/grouping/GroupingConnector.java:27 @Configurable cannot be applied to field with static modifier.:27
[ERROR] error on execute: An error ocurred while the DevKit was generating Java code. Check the logs for further details.
- Parameters:
notificationsNotes - the list of notifications to be printed while sortedprocessingEnv - the environment to process the file pathscontext - the context needed to print the messageskind - the type of error we want to be displayedsingular - the label used to describe the header if there is ONE notification in the listplural - the label used to describe the header if there is TWO (or more) notifications in the list