EADS-3671 - Comment line folding have problems in PL/SQL
authorchrislovsund@netbeans.org
Thu, 02 May 2013 17:29:38 +0200
changeset 391e19b67ac4799
parent 390 305b6f0a2e87
child 392 6df13ea7e06c
EADS-3671 - Comment line folding have problems in PL/SQL
rename method
PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlTypedBreakInterceptor.java
     1.1 --- a/PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlTypedBreakInterceptor.java	Thu May 02 17:20:19 2013 +0200
     1.2 +++ b/PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlTypedBreakInterceptor.java	Thu May 02 17:29:38 2013 +0200
     1.3 @@ -34,7 +34,7 @@
     1.4        int insertPos = context.getCaretOffset();
     1.5        int lineStartPos = Utilities.getRowStart(doc, insertPos);
     1.6        String word = Utilities.getWord(doc, lineStartPos);
     1.7 -      if (word.equals("--") && isHeaderComment(doc, insertPos)) {
     1.8 +      if (word.equals("--") && isInitialComment(doc, insertPos)) {
     1.9           context.setText("\n--  ", 0, 5);
    1.10        } else if (word.equals("--------------------")) {
    1.11           context.setText("\n-------------------- ", 0, 22);
    1.12 @@ -51,7 +51,7 @@
    1.13        LOG.log(Level.FINER, "cancelled, context: {0}", context);
    1.14     }
    1.15  
    1.16 -   private boolean isHeaderComment(BaseDocument doc, int insertPos) throws BadLocationException {
    1.17 +   private boolean isInitialComment(BaseDocument doc, int insertPos) throws BadLocationException {
    1.18        for (int i = 0; i < Utilities.getLineOffset(doc, insertPos); i++) {
    1.19           int rowStartFromLineOffset = Utilities.getRowStartFromLineOffset(doc, i);
    1.20           String word = Utilities.getWord(doc, rowStartFromLineOffset);