[PHPStorm plugin development] Can't find jar file with com.jetbrains.php package

Itry write my first plugin for phpstorm. I use IDEA Community, I selected phpstorm 2.1.2 installation folder as Plugin SDK folder. In phpstorm in PSI Viewer I see a reference to PhpDocType element: com.jetbrains.php.lang.documentation.phpdoc.psi.impl.PhpDocTypeImpl. But I can't open this file (class) in my IDEA Community, whole com.jetbrains package doesn't exists. What I'm missing, where it is?


PHP support is closed source and has no open API today so you can't legally write a plugin to it.

The problem is that we so significantly change the internals that no plugin will survive.
We had these problems with other languages in the past, so we didn't publish an API to program against deliberately.

We can discuss your plugin idea and include it into main code or possibly give you some info on how to proceed.


When api become available? I wish add support for magento specific things like autocomplete for block types, click on block type in layout update xml should open block class, Mage::helper(), Mage::getModel(), etc factory methods support. Link model->getResource() with appropriate resource model, model->getCollection() with appropriate collection and many other magento (and maybe partially zend framework) specific things. As I know, there is some eclipse plugin for magento, don't know how good it is. Because I don't wish deal with eclipse I decided to write plugin for phpstorm.


We do not plan to open in in near future.

However we plan to finally advance on various framework support related features in 3.0
I had mail conversations with magento devs about support but in the end they didn't even managed to create proper tickets for required features.
And I can't even find a generic "magento support" request: http://youtrack.jetbrains.net/issues/WI?q=%23Unresolved+magento
...So we didn't investigate and are not provided with even essential feature list. Thus I can't even give you an estimate on this.
As to generic advanced metadata facilities that may help you to achieve your goals - they are postponed because they were proven to be both too infexible and too complex to implement and configure.


I guess they didn't manage to create tickets because magento2 in early dev stage. There are plenty of changes there and more and more changes are planned, for example some custom annotations were added. Because I work every day with magento code and bored with phpstorm false warnings, lack of autocomplete, etc. I decided to write this plugin. If api isn't planned to release - seems like I have to switch to look at that eclipse plugin (and maybe even switch to eclipse if it is really good :(). But I'm with phpstorm almost 2 years, I don't wish to do it. If I post tickets to your BTS - when I can expect they could be implemented? From my past experience with phpstorm team I must wait at least one year.

That's why, please consider idea to make php api public, it can speed up phpstorm expansion a lot. You know, the biggest phpstorm weakness is lack of frameworks support. With php api in 2-3 months you will have community plugings for most known php frameworks. Yes, initially they will be really bad and bugged because not many php developers are familar with java and especially with idea plugins development. But in 1 year faremoworks support can be even better than it is now in netbeans, zend studio, etc... Instead you wish us to wait 1+ year before you _start_ adding frameworks support.


Fair enough... but the learning curve for implementing such an extended features is *very* steep.
We need to lay more groundworks (i.e. extension points) before publishing an openapi for PHP. Some of this will be done in 3.0...

While we plan to invest resources into user-serviceable framework support features we have more pressing matters in current timeframe and limited resources. The PhpStorm is relatively young project - comparing to the such an advanced products as IDEA and Resharper.

Anyway we'll try to do our best to make the PS the best PHP product. Thanks for your sincere words.


Please sign in to leave a comment.