[TxMt] Re: PHP Smart Code Completion (a.k.a Intellisense)

Mario Ricalde mario at ricalde.org
Tue Mar 2 15:18:19 UTC 2010


> Gaby Vanhegan:
> 
>> I've been working on a PHP Smart Autocompletion / Intellisense for Textmate and I though I would ask a couple of questions to any PHP Developer interested on the idea:
>> 
>> 1. Would you like smart code completion to work only on the included files or in the current project?
> 
> Whole project.  FlashDevelop have got this kind of thing right, if you could use that as a model then you'd have an amazing plugin.
> 
>> 2. What Frameworks for PHP do you use with textmate?
> 
> If you can get point 1 right then this doesn't matter.
> 
>> 3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?
> 
> For me, no.  Provided there was an option to clear that cache somehow.
> 
>> When I say Smart Autocompletion, I mean it'll know your classes inheritance, how you call them, the scope, etc.
> 
> FlashDevelop goes even further with this, parsing JavaDoc style comments and using them as tooltips in the autocomplete. Very handy.

Gaby, I already got it right. Parsing all the competent files on the project and parsing them accordingly; good to know I'm on the good path.

It's good to know what Frameworks you work on, yes it does matter. Mostly  because most of them use different naming conventions adding prefixes to the "real classes" and removing them from the loading process. ( for example, new MyClass will load MyFrameWork_MyClass ).

The PHP Smart Autocompletion is prepared to work with the tooltips with documentation; however, the Textmate provided DIALOG is not good enough to handle this kind of stuff; I'll be adding it later when Joachim finishes his mod.

> On Mon, Mar 1, 2010 at 2:33 PM, Gaby Vanhegan wrote:
> 
> I totally agree with Gaby. The same thing is with Flash Builder.
> If you could get this kind of behavior it would be my YES for still working
> TextMate - I'm currently checking other editors for code completion.
> 
> Btw. how advanced the progress is? :) When can we expect some preview? :) Or
> you gonna make it TM2 like - just rumors :)
> Still TM is my favorite editor and I don't want to switch to other ... :)

As I already stated, the behavior can be achieved; it's just a matter of time before Joachim updates his mod for dialog. Also, it's good to know that this bundle will actually make some PHP Developers use TextMate more :)

About how advanced the bundlee is:
I already had a pre-beta, which was a complete mess and was my first try. Doing it wrong with Regular Expressions. It worked, but not with as smart as I wanted it to be. About the current version, here's what I have and what I need to do:

PHP Parser, 90% done.
It's almost perfect, I just need to make a little tweaking. For instance, I'm thinking about storing definition of class-level variables within a class method. Even if they were not defined during the definition of the class via "public/private/protected/static $var".
Project Files, 100% done.
Caching Process, 95% done.
Need some tweaking on this. Will leave it for the after-release.
Current Scope Identification 10%
I need to work more on this, because of the way TextMate handles "words", $this->sad are 3 words, which means I'll need to parse the current line for autocompletion, resolve the variables and scope and then perform the project parsing.
Building of the AutoCompletion 80%
After resolving the relationship, scope, visibility, etc. The building will come in. I already have this done because of the pre-beta.

About the release date; I'm not sure. I'm working on it on my free time and today is my birthday; so I won't have a lot of time for me to work with it today. I'll try to keep you posted. If you can please give me any ideas to add it would be great, because this is the best stage for doing that.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20100302/a8bec00a/attachment.html>


More information about the textmate mailing list