Skip to content

Commit

Permalink
Resue AcceleoEvaluator line delimiter to write log.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Feb 28, 2024
1 parent 3e89f61 commit 2de3f8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ private static void generate(AcceleoEvaluator evaluator, IQualifiedNameQueryEnvi

if (logURI != null && evaluator.getGenerationResult().getDiagnostic()
.getSeverity() != Diagnostic.OK) {
// TODO provide Charset and line delimiter
// TODO provide Charset
try {
final IAcceleoWriter logWriter = generationStrategy.createWriterForLog(logURI,
StandardCharsets.UTF_8, parameterName);
printDiagnostic(logWriter, evaluator.getGenerationResult().getDiagnostic(), "", System
.lineSeparator());
printDiagnostic(logWriter, evaluator.getGenerationResult().getDiagnostic(), "", evaluator
.getNewLine());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ public AcceleoEvaluator(IQualifiedNameLookupEngine lookupEngine, String newLine)
this.newLine = newLine;
}

/**
* Gets the new line {@link String}.
*
* @return the new line {@link String}
*/
public String getNewLine() {
return newLine;
}

/**
* Generates the given {@link AcceleoASTNode} with the given variables.
*
Expand Down

0 comments on commit 2de3f8b

Please sign in to comment.