no indentation of HTML and phpdocs
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / ToolFactory.java
index 9f8a201..aea8d2e 100644 (file)
  *     IBM Corporation - added #createScanner allowing to make comment check stricter
  ******************************************************************************/
 package net.sourceforge.phpdt.core;
-
 import java.util.Map;
 
 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
 import net.sourceforge.phpdt.internal.formatter.CodeFormatter;
-import net.sourceforge.phpeclipse.PHPCore;
 
 import org.eclipse.core.runtime.Plugin;
 
@@ -40,7 +39,7 @@ public class ToolFactory {
         */
        public static ICodeFormatter createCodeFormatter(){
                
-                       Plugin jdtCorePlugin = PHPCore.getPlugin();
+                       Plugin jdtCorePlugin = JavaCore.getPlugin();
                        if (jdtCorePlugin == null) return null;
                
 //                     IExtensionPoint extension = jdtCorePlugin.getDescriptor().getExtensionPoint(JavaModelManager.FORMATTER_EXTPOINT_ID);
@@ -79,7 +78,7 @@ public class ToolFactory {
         */
        public static ICodeFormatter createDefaultCodeFormatter(Map options){
 
-               if (options == null) options = PHPCore.getOptions();
+               if (options == null) options = JavaCore.getOptions();
                return new CodeFormatter(options);
        }
        
@@ -162,4 +161,12 @@ public class ToolFactory {
                scanner.recordLineSeparator = recordLineSeparator;
                return scanner;
        }
+       
+       public static Scanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean recordLineSeparator, boolean phpMode){
+
+               Scanner scanner = new Scanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/);
+               scanner.recordLineSeparator = recordLineSeparator;
+               scanner.setPHPMode(phpMode);
+               return scanner;
+       }
 }