I need to use PsiManager but I'm getting the following error in my dependencies Follow
1:18 μ.μ. Plugin error
Plugin ... requires plugin 'com.intellij.modules.java' to be installed
These are all my dependencies. The second one seems to have the problem.
However in IntelliJ IDEA works fine when I run the plugin.
The error happens when I install it in my PhpStorm and restart to be enabled
<depends>com.intellij.modules.lang</depends> <!-- 1st -->
<depends>com.intellij.modules.java</depends> <!-- for psi -->
Please sign in to leave a comment.
Gradle is highly recommended for plugin development. Please see:
If you still want to use your approach (I assume it's DevKit), please follow these steps to set up plugin dependencies: https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#2-project-setup (Notice "DevKit" tab).
I just figured out that the issue was that I used com.intellij.modules.java to get list of methods (PsiMethod) which are supported in java only.
But how can I give support to multiple IDEs to get list of java/kotlin/python/ruby/ts/es6/js/php classes, functions and/or methods? as seen in Structure tool window. I need names and line positions as well.
Here I can see the available dependings that can be used as optional for each ide. But what is the PsiMethod, PsiFunction and PsiClass for each language?
The easiest way to get class names for these elements is to use PsiViewer to inspect a PSI structure for files in languages of your interest. Please see:
on how to enable it.
Also, take a look at other sections in Part VIII - Product Specific section, eg.:
but I am very confused.
I have used PSIViewer and I see the classes of each psi element, but I dont understand how to get access to them while I am developing.
For example how do I get access to package containing KtClass ? what library should I import to my plugin,
and how to get access also to
Let's do it step by step for PHP then.
gradle-intellij-pluginproperties should be configured, so you have to include these values in your
build.gradle.ktsfile (if you created your project from the template, you should change proper properties in
And that's it, PHP classes will be available in your project.
my plugin is not Gradle-based and is written in java.
Is grandle necessary? because I have never used it before...