improved PHP Scanner
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPParserAction.java
index e9376f5..774fbf1 100644 (file)
@@ -18,7 +18,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPParser;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
@@ -28,6 +27,8 @@ import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.ui.texteditor.TextEditorAction;
+import test.PHPParserSuperclass;
+import test.PHPParserManager;
 
 /**
  * Class that defines the action for parsing the current PHP file
@@ -86,7 +87,7 @@ public class PHPParserAction extends TextEditorAction {
           } catch (IOException e) {
           }
         } else {
-          PHPParser.phpExternalParse(fileToParse);
+          PHPParserSuperclass.phpExternalParse(fileToParse);
         }
       }
     } catch (CoreException e) {
@@ -137,7 +138,7 @@ public class PHPParserAction extends TextEditorAction {
   //    identifier.append((char) c);
   //    try {
   //      while ((c = iStream.read()) != (-1)) {
-  //        if (Character.isJavaIdentifierPart((char) c)) {
+  //        if (Scanner.isPHPIdentifierPart((char) c)) {
   //          identifier.append((char) c);
   //          //        } else if ((i == 0) && (c == '$')) {
   //          //          identifier.append((char)c);
@@ -164,7 +165,7 @@ public class PHPParserAction extends TextEditorAction {
     }
     String input = buf.toString();
 
-    PHPParser parser = new PHPParser(fileToParse);
+    PHPParserSuperclass parser = PHPParserManager.getParser(fileToParse);
     try {
       parser.parse(input);
     } catch (CoreException e) {