PHP Parser Version 2.0.5 ($Date: 2014-11-06 19:01:49 +0900 (木, 06 11 2014) $)
Matthieu Casanova <chocolat.mou@gmail.com> 

Introduction

In the beginning of 2003 I found the phpeclipse project, a plugin to do php in Eclipse. I worked on it, and finaly wrote an alternative php parser for the project. The matter is that I don't like SWT very much so when I discovered discovered jEdit I loved it. So I decided to write a plugin using my php parser. It uses ErrorList plugin to show the errors and Sidekick plugin to manage parser.

Usage

Parsing

The parser is now launched by Sidekick plugin. You can ask to reparse the file with the "parse buffer" action of Sidekick. You can choose to enable parse on keystroke within Sidekick, it should be slower, but with good computer there will be no problem.

Project management

The project management is a feature that will allow you to describe a project. A project is a group of files (under a root folder). It supports VFS so you can have a root on a ftp for example. To manage project please open the dockable view. When you create a project you'll have to choose a root folder. After that, click on the "reparse" button. It will parse all php files in your project and keep track of them in memory (you can show the parsing progress in the jEdit's IO threads). Of course, each time you'll open a file in your project and work on it, this file will be updated in the project memory. But only files under your root will be added. This feature will be useful for code completion (there is a little but I hope I'll add a lot more after), and for code browsing

Code Browsing

The parser will provide a Sidekick structure view of you file, to show it, use the "Structure browser" of Sidekick plugin. There are also 3 actions to browse php code : Find class, Find method and Find in file. Those actions will work if you have a project up to date. It will display a small dialog working like OpenIt plugin (I took a lot of ideas from this plugin), and you'll be able to do incremental search on classes, methods, displaying a little list of matching class or methods (depends on action you choosed). When you select one, the file will be opened at the good position.

Code completion

I added some code completion, but it doesn't work very well for the moment. To enable it, please use the action "Show completion popup" from Sidekick. There are completion after the following situation :

The completion will work better with a project too, for example after new and extends, I will display all classes in the project. After $this-> I'll display methods and fields of the class and superclasses. After AnyClass:: I'll display methods of the class and superclasses ...

Code analysis

There are some code analysis but you should be very careful because it's far from being perfect. If a variable is given to a method and is assigned by reference, the parser will not know that and report it as variable used but not assigned ...

History

known issue

Feedback

Please report bugs to the bug jEdit's plugin tracker on sourceforge.net