Skip to content

Commit

Permalink
[sarl] Enable the user issue formatter to delegate to the default iss…
Browse files Browse the repository at this point in the history
…ue formatter within the batch compiler.

If the user issue formatter replies a null message text, the default
issue formatter is used for obtaining the issue message text.

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Jul 25, 2018
1 parent 5d280c0 commit 8cea363
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -1256,7 +1256,10 @@ protected String createIssueMessage(Issue issue) {
final IssueMessageFormatter formatter = getIssueMessageFormatter();
final org.eclipse.emf.common.util.URI uriToProblem = issue.getUriToProblem();
if (formatter != null) {
return formatter.format(issue, uriToProblem);
final String message = formatter.format(issue, uriToProblem);
if (message != null) {
return message;
}
}
if (uriToProblem != null) {
final org.eclipse.emf.common.util.URI resourceUri = uriToProblem.trimFragment();
Expand Down Expand Up @@ -2062,7 +2065,7 @@ public interface IssueMessageFormatter {
*
* @param issue the issue.
* @param uri URI to the problem.
* @return the message.
* @return the message; or {@code null} for using the default formatter.
*/
String format(Issue issue, org.eclipse.emf.common.util.URI uri);

Expand Down

0 comments on commit 8cea363

Please sign in to comment.