bugfix 1413452, migration to 3.1 API had a typo, so all indentation strategies didn...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / phpdoc / JavaDocAutoIndentStrategy.java
index a8b6374..2f5d8b7 100644 (file)
@@ -1,10 +1,10 @@
 /*******************************************************************************
  * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
- *
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -52,7 +52,7 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
 
        /**
         * Creates a new Javadoc auto indent strategy for the given document partitioning.
-        *
+        * 
         * @param partitioning the document partitioning
         */
        public JavaDocAutoIndentStrategy(String partitioning) {
@@ -414,7 +414,7 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
 
        /**
         * Method jdocWrapParagraphFromLine.
-        *
+        * 
         * @param document
         * @param line
         * @param always
@@ -479,7 +479,7 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
        }
 
        /**
-        * Line break iterator to handle whitespaces as first class citizens.
+        * Line break iterator to handle whitespaces as first class citizens. 
         */
        private static class LineBreakIterator {
 
@@ -533,8 +533,8 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
        }
 
        /**
-        * Formats a paragraph, using break iterator.
-        *
+        * Formats a paragraph, using break iterator.  
+        * 
         * @param offset an offset within the paragraph, which will be updated with respect to formatting.
         */
        private static String formatParagraph(String paragraph, int[] offset, String prefix, String lineDelimiter, int margin) {
@@ -548,9 +548,9 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
                int index= offset[0];
                int indexBuffer= -1;
 
-         // line delimiter could be null
-        if (lineDelimiter == null)
-            lineDelimiter= ""; //$NON-NLS-1$
+                // line delimiter could be null
+               if (lineDelimiter == null)
+                       lineDelimiter= ""; //$NON-NLS-1$
 
                for (int start= iterator.first(), end= iterator.next(); end != BreakIterator.DONE; start= end, end= iterator.next()) {
 
@@ -659,9 +659,9 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
        private String getLineContents(IDocument d, int line) throws BadLocationException {
                int offset = d.getLineOffset(line);
                int length = d.getLineLength(line);
-        String lineDelimiter= d.getLineDelimiter(line);
-        if (lineDelimiter != null)
-            length= length - lineDelimiter.length();
+               String lineDelimiter= d.getLineDelimiter(line);
+               if (lineDelimiter != null)
+                       length= length - lineDelimiter.length();
                String lineContents = d.get(offset, length);
                int trim = jdocExtractLinePrefix(d, line).length();
                return lineContents.substring(trim);