Changeset 45 in default


Ignore:
Timestamp:
11/30/10 13:32:25 (13 years ago)
Author:
zeiss
Message:
 
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

    r44 r45  
    6565                        char originalPosition = originalText.charAt(bufferPositionOriginalText); 
    6666                         
     67                        String commentPrefix = "<span lang=EN-GB style='color:green;mso-no-proof:no'>"; 
     68                        String commentSuffix = "<o:p></o:p></span>"; 
     69 
    6770                        if (formattedPositionNoWhitespaces != originalPosition) { 
    6871//                              if ((currentMetaText != null) && (bufferPositionFormattedTextNoWhitespaces == currentMetaText.getOffset())) { 
     
    8588                                                        if (newLinesCount > 0) { 
    8689                                                                if (scanBackNewlinesCount(result.toString(), result.toString().length()-1) == 0) { 
    87                                                                         result.append("\n\n"); 
     90//                                                                      result.append("\n\n"); 
     91//                                                                      result.append("<p>"); 
    8892                                                                } 
    89                                                                  
    90                                                                 result.append(currentComment.getText()); 
    91                                                                 result.append("\n"); 
     93                                                                result.append("\n<br/><br/>"); 
     94                                                                result.append(commentPrefix + currentComment.getText() + commentSuffix); 
     95//                                                              result.append("\n"); 
     96                                                                result.append("\n<br/>"); 
     97//                                                              result.append("<p/>"); 
    9298                                                        } else { 
    9399                                                                String lastWhiteSpaces = scanBackWhitespaces(result.toString(), result.toString().length()-1); 
    94100                                                                result.delete(result.toString().length() - lastWhiteSpaces.length(), result.toString().length()); 
    95                                                                 result.append(" " + stripEndingNewline(currentComment.getText())); 
     101//                                                              result.append(" " + stripEndingNewline(currentComment.getText())); 
     102                                                                result.append("&nbsp;" + commentPrefix + stripEndingNewline(currentComment.getText()) + commentSuffix); 
    96103                                                                result.append(lastWhiteSpaces); 
    97104                                                        } 
     
    101108                                                        result.delete(result.toString().length() - lastWhiteSpaces.length(), result.toString().length()); 
    102109                                                        if (newLinesCount > 0) { 
    103                                                                 result.append("\n\n" + stripEndingNewline(currentComment.getText())); 
     110//                                                              result.append("\n\n" + stripEndingNewline(currentComment.getText())); 
     111                                                                result.append("<br/><br/>" + commentPrefix + stripEndingNewline(currentComment.getText()) + commentSuffix); 
    104112                                                        } else { 
    105                                                                 result.append(" " + stripEndingNewline(currentComment.getText())); 
     113//                                                              result.append(" " + stripEndingNewline(currentComment.getText())); 
     114                                                                result.append("&nbsp;" + commentPrefix + stripEndingNewline(currentComment.getText()) + commentSuffix); 
    106115                                                        } 
    107116                                                        result.append(lastWhiteSpaces); 
Note: See TracChangeset for help on using the changeset viewer.