com.jetbrains.php classes availability

Hello. I'm writing plugin for PhpStorm and it would be wonderfull if I can use classes from com.jetbrains.php.* packages in it. But they are not available.
Is there any possibility to use it somehow?

PhpStorm(Personal licence), IDEA Community Edition.

0
12 comments

To use the PHP classes in your plugin, you need to add the jar of the PHP plugin to the classpath of your IntelliJ IDEA SDK and to add a <depends>com.jetbrains.php</depends> tag to your plugin.xml.

0

So easy... Thank you, Dmitry.


0

I can't, for the live of me, find the php jar you are mentioning Dmitry ?:|
I'm using IntelliJ IDEA Ultimate edition with the PHP plugin installed, but I don't see any mention of it in the plugin folder. Can you point me in the right direction here as to were to find it?
I need it to check the PhpElementType, a file which I can't seem to find anywhere! :_|

0

If you install the PHP plugin through the plugin manager, it will be placed in the plugins directory:
http://devnet.jetbrains.com/docs/DOC-181
Alternatively, you can download the PHP plugin from http://plugins.jetbrains.com into whatever directory you like.

0
Avatar
Permanently deleted user

Is not working for me, I have created my SDK pointing to my PHPStorm installation folder, I can see phpstorm.jar in my External library, but I can't find any PHP class (for example PhpElementType) using Ctrl+N.
What am I doing wrong?

0

Have you actually read my first reply in this thread and done what it advises to do?

0
Avatar
Permanently deleted user

Yes but my SDK is based on PHPStorm, I don't have a separated .jar for phpstorm, anyway, I think it was added correctly, because I can see phpstorm.jar inside my External Libraries.
But I can't find any PHP specific class there !
I've tried adding "<depends>com.jetbrains.php</depends>" too, and maybe there's an error here because the IDE is marking it as an error, it says: "cannot resolve plugin com.jetbrains.php"

0

Please read the message and follow the instructions. The PHP plugin in PhpStorm is packaged as a separate plugin, just like in IntelliJ IDEA. The plugin is in plugins/php/lib/php.jar and php-openapi.jar under the PhpStorm installation directory.

0

Enrique, you should add <PhpStorm folder>/plugins/php/lib/php.jar (this path is correct for PHPStorm 5) to SDKs classpath in Main menu>File>Project structure>SDKs>WebStorm...>classpath. It helped me.

BTW, Dmitry, what the difference by "PHP open API" which appeared in PHPStorm 6 and this way?

0
Avatar
Permanently deleted user

Sorry, I was assuming the plugin was added automatically when using PHPStorm as the source for the SDK. Thanks for the clarification. It's working now :)

0

Are the sources for PHP OpenAPI published? Where I could find them to attach to PluginSDK?

0
Avatar
Permanently deleted user

Are the sources for PHP OpenAPI published? Where I could find them to attach to PluginSDK?

I'm also looking for them or at least for javadoc.

0

Please sign in to leave a comment.