Exclude Android Studio from plugin.xml

Answered

Hi,

I am wondering whether it is possible to exclude Android Studio from my plugin.xml configuration.

Some background on why I want to achieve this:

My plugin depends on vcs support from IntelliJ. However, Android Studio seems to have removed loads of classes, including 

com.intellij.vcs.log.VcsLogProvider#readFullDetails(com.intellij.openapi.vfs.VirtualFile, java.util.List<java.lang.String>, com.intellij.util.Consumer<com.intellij.vcs.log.VcsFullCommitDetails>)

Effectively, the plugin crashes because those methods are not present.

Can you point me to some solution to readd those missing methods or give me some hint to exclude Android Studio?

Thanks,

Matthias

0
3 comments

Hi Matthias,

it looks like the problem happens not because Android Studio removes some classes from IntelliJ Platform, but because it's based on older version of the IntelliJ Platform where these classes don't exist yet. The mentioned method was added in 163.* builds of IntelliJ Platform, but Android Studio 2.3 is based on 162.2228.14 (see the mapping from Android Studio versions to IntelliJ Platform builds). To avoid such problems you need to property with which builds of IntelliJ platform your plugin is compatible, see Build Number Ranges for details.

0

Hi Nikolay,

thanks for the hint, I'll try it that way. By the way: How can I find out on which version / since which version an API is available?

Thanks,

Matthias

0

Unfortunately there is no simple way to do this. We have '@since' tags in some javadocs, but not so often. So the only reliable way is compiling the plugins against different IDEA versions. If you use gradle-intellij-plugin it should be rather easy.

0

Please sign in to leave a comment.