X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java index e9376f5..f5cbca0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java @@ -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,9 +27,11 @@ 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 + * ClassDeclaration that defines the action for parsing the current PHP file */ public class PHPParserAction extends TextEditorAction { @@ -57,18 +58,26 @@ public class PHPParserAction extends TextEditorAction { */ public void run() { boolean phpFlag = false; + + // try { + fileToParse = getPHPFile(); + parseFile(fileToParse); + } + + public static void parseFile(IFile fileToParse) { + boolean phpFlag = false; try { - fileToParse = getPHPFile(); + if (fileToParse == null) { // should never happen System.err.println("Error : no file in the editor"); // should throw an exception return; } - String name = fileToParse.getName(); - for (int i = 0; i