bugfix 1413452, migration to 3.1 API had a typo, so all indentation strategies didn...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPAutoIndentStrategy.java
index 3850ccf..5647b5b 100644 (file)
@@ -7,7 +7,7 @@ http://www.eclipse.org/legal/cpl-v10.html
 
 Contributors:
     IBM Corporation - Initial implementation
-    Klaus Hartlage - www.eclipseproject.de
+    www.phpeclipse.de
 **********************************************************************/
 package net.sourceforge.phpeclipse.phpeditor.php;
 
@@ -221,10 +221,17 @@ public class PHPAutoIndentStrategy extends DefaultAutoIndentStrategy {
                        } else {
                                int start= document.getLineOffset(line);
                                int whiteend= findEndOfWhiteSpace(document, start, command.offset);
+                               int offset = -1;
+//                             if (command.offset > 0 && command.offset < docLength && document.getChar(command.offset-1) == '{') {
+//                               offset = command.offset;
+//                             }
                                buf.append(document.get(start, whiteend - start));
                                if (getBracketCount(document, start, command.offset, true) > 0) {
                                        buf.append('\t');
                                }
+//                             if (offset >= 0) {
+//                               buf.append('}');
+//                             }
                        }
                        command.text= buf.toString();