Fixed bug in CodeFormatter; for partial formatting select complete <?php ... ?> range
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / formatter / CodeFormatter.java
index 7efbade..e4ec3cf 100644 (file)
@@ -15,14 +15,22 @@ import java.io.StringReader;
 import java.util.Hashtable;
 import java.util.Locale;
 import java.util.Map;
+
 import net.sourceforge.phpdt.core.ICodeFormatter;
 import net.sourceforge.phpdt.core.compiler.CharOperation;
 import net.sourceforge.phpdt.core.compiler.ITerminalSymbols;
 import net.sourceforge.phpdt.core.compiler.InvalidInputException;
 import net.sourceforge.phpdt.internal.compiler.ConfigurableOption;
 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+import net.sourceforge.phpdt.internal.corext.codemanipulation.StubUtility;
+import net.sourceforge.phpdt.internal.corext.util.Strings;
 import net.sourceforge.phpdt.internal.formatter.impl.FormatterOptions;
 import net.sourceforge.phpdt.internal.formatter.impl.SplitLine;
+import net.sourceforge.phpdt.internal.ui.preferences.CodeFormatterPreferencePage;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.formatter.IContentFormatterExtension;
+import org.eclipse.jface.text.formatter.IFormattingContext;
 /**
  * <h2>How to format a piece of code ?</h2>
  * <ul>
@@ -32,6 +40,7 @@ import net.sourceforge.phpdt.internal.formatter.impl.SplitLine;
  * </ul>
  */
 public class CodeFormatter implements ITerminalSymbols, ICodeFormatter {
+ // IContentFormatterExtension {
   public FormatterOptions options;
   /**
    * Represents a block in the <code>constructions</code> stack.
@@ -2536,4 +2545,5 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter {
   public void setInitialIndentationLevel(int newIndentationLevel) {
     this.initialIndentationLevel = currentLineIndentationLevel = indentationLevel = newIndentationLevel;
   }
+  
 }
\ No newline at end of file