Changeset 44 in default
- Timestamp:
- 11/30/10 12:20:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java
r43 r44 18 18 import de.ugoe.cs.swe.bnftools.ebnf.SingleDefinition; 19 19 import de.ugoe.cs.swe.bnftools.ebnf.StringRule; 20 import de.ugoe.cs.swe.bnftools.ebnf.Term; 20 21 21 22 public class EbnfHtmlFormatterVisitor extends EbnfFormatterVisitor { … … 309 310 wrap(); 310 311 311 metaText("<u><span style='color:blue'><a href=\"#T" + node.getRuleref().getName().replaceAll("[ \t\n\r]","") + "\">"); 312 textTransformed(node.getRuleref().getName(), node.getRuleref().getName().replaceAll("[ \t\n\r]", "") + "</a></span></u>"); 312 String prefix = "<u><span style='color:blue'><a href=\"#T" + node.getRuleref().getName().replaceAll("[ \t\n\r]","") + "\">"; 313 // metaText(prefix); 314 textTransformed(node.getRuleref().getName(), prefix + node.getRuleref().getName().replaceAll("[ \t\n\r]", "") + "</a></span></u>"); 313 315 } 314 316 … … 328 330 text(node.getRulenumber() + ". "); 329 331 330 metaText("<span lang=EN-GB style='mso-no-proof:no'>");331 metaText("<a name=\"T" + node.getName() + "\">");332 textTransformed(node.getName(), node.getName().replaceAll("[ \t\r\n]", ""));333 metaText("</a>");332 String prefix = "<span lang=EN-GB style='mso-no-proof:no'><a name=\"T" + node.getName() + "\">"; 333 // metaText(prefix); 334 textTransformed(node.getName(), prefix + node.getName().replaceAll("[ \t\r\n]", "") + "</a>"); 335 // metaText("</a>"); 334 336 text(" ::= "); 335 337 … … 350 352 if (node.getLiteral() != null) { 351 353 // text("\"" + node.getLiteral() + "\""); 352 textTransformed("\"" + node.getLiteral() + "\"", StringEscapeUtils.escapeHtml("\"" + node.getLiteral() + "\"").replaceAll("[ \t\n\r]", "") );354 textTransformed("\"" + node.getLiteral() + "\"", StringEscapeUtils.escapeHtml("\"" + node.getLiteral() + "\"").replaceAll("[ \t\n\r]", "").trim()); 353 355 // textTransformed("\"" + node.getLiteral() + "\"", "gnabar"); 354 356 } else if (node.getColon() != null) { 355 357 // text("\"\"\""); 356 textTransformed("\"\"\"", StringEscapeUtils.escapeHtml("\"\"\"").replaceAll("[ \t\n\r]", "") );358 textTransformed("\"\"\"", StringEscapeUtils.escapeHtml("\"\"\"").replaceAll("[ \t\n\r]", "").trim()); 357 359 // textTransformed("\"\"\"", "gnabar"); 358 360 } … … 361 363 protected void visitAfter(StringRule node) { 362 364 } 365 366 protected void visitAfter(Term node) { 367 if (!isLastElement()) { 368 metaText("<span style='mso-spacerun:yes'> </span>"); 369 newLineOffsetCounter++; 370 // space(); 371 } 372 } 373 363 374 }
Note: See TracChangeset
for help on using the changeset viewer.