예제 #1
0
 public TextRegionsToString addReplacement(
     ITextSegment region, String replacement, String description) {
   text.add(region, getReplacement(region, replacement));
   list.add(
       region, quote(region.getText(), 20) + " -> " + quote(replacement, 20) + ": " + description);
   return this;
 }
예제 #2
0
 protected String getReplacement(ITextSegment region, String replacement) {
   String string = region.getText();
   if (Strings.equal(string, replacement))
     return "<" + region.getOffset() + "|" + replacement + ">";
   return "<" + region.getOffset() + ":" + region.getLength() + "|" + replacement + ">";
 }