allow rendering additional information in a comparison
This commit is contained in:
parent
e044bf6607
commit
7f74b4521a
|
@ -45,6 +45,7 @@ public class ComparisonRenderer implements IEvaluationContext {
|
|||
private ComparisonSession session;
|
||||
private Map<String, String> templates = new HashMap<>();
|
||||
private String folder;
|
||||
private String preamble;
|
||||
|
||||
public ComparisonRenderer(IWorkerContext contextLeft, IWorkerContext contextRight, String folder, ComparisonSession session) {
|
||||
super();
|
||||
|
@ -53,6 +54,14 @@ public class ComparisonRenderer implements IEvaluationContext {
|
|||
this.folder = folder;
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
public String getPreamble() {
|
||||
return preamble;
|
||||
}
|
||||
|
||||
public void setPreamble(String preamble) {
|
||||
this.preamble = preamble;
|
||||
}
|
||||
|
||||
public Map<String, String> getTemplates() {
|
||||
return templates;
|
||||
|
@ -61,6 +70,9 @@ public class ComparisonRenderer implements IEvaluationContext {
|
|||
public File render(String leftName, String rightName) throws IOException {
|
||||
dumpBinaries();
|
||||
StringBuilder b = new StringBuilder();
|
||||
if (preamble != null) {
|
||||
b.append(preamble);
|
||||
}
|
||||
b.append("<table class=\"grid\">\r\n");
|
||||
b.append(" <tr>\r\n");
|
||||
b.append(" <td width=\"260\"><b>"+Utilities.escapeXml(leftName)+"</b></td>\r\n");
|
||||
|
|
Loading…
Reference in New Issue