How to use Python language PSI model for plugin development in intellij idea

Answered

I added <depends>com.intellij.modules.python</depends> in plugin.xml 

and 

intellij {

plugins.set(properties("com.intellij.modules.python")) 

}

in build.gradle.kts

0
6 comments

sorry, it's plugins.set(listOf("com.intellij.modules.python"))

0

Please always share the full context (full build script) and information about expected/actual behaviors.

0

i am developing a plugin in intellij for intellij, Android studio, pycharm, clion. I want to use the PsiTree to get the method text of a user file. 

https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#preparing-sandbox

 

I am able to do it for java files where i used <depends>com.intellij.java</depends> It installed an external library relevant to it. This page also gives dependency for PSI model for Python. I am not able to use it. I am not able to get the external library related to it. 

0

I want to use com.intellij.java and com.intellij.modules.python both in my project. I set the intellij { type.set("IC")} and get java one. When I set it to PC I am able to get python one. Please help. 

0

hello Karol, any update?

0

Hi,

I'm not able to help you without the information I asked you for:

Please always share the full context (full build script) and information about expected/actual behaviors.

0

Please sign in to leave a comment.