How to get the idea version

Hi
Is there a way for plugins to determine the version of idea they are running in at startup?

Thanx
Bronwen

0
Avatar
Permanently deleted user

Is there a way for plugins to determine the version of idea they are running in at startup?

Don't know for the OpenAPI, but if you have a complete(clean) install,
than in your ${idea.home} there should be a 'build.txt' file with the
build number of the distribution.

Ahmed.

0

Thanx Ahmed,

I was looking for a way to determine the version at runtime, though. I have a plugin for which i would like to load different adpator classes depending on the version of idea being used so i can create one plugin that supports all versions.

Cheers
Bronwen

0
Avatar
Permanently deleted user

com.intellij.openapi.application.ApplicationInfo

1
Avatar
Permanently deleted user

Bronwen, I think the best way to do this is to release multiple versions of the
plugin with different since-build and until-build fields in the plugin.xml.

Bronwen Cassidy wrote:

Thanx Ahmed,

I was looking for a way to determine the version at runtime, though. I have a plugin for which i would like to load different adpator classes depending on the version of idea being used so i can create one plugin that supports all versions.

Cheers
Bronwen

0
Avatar
Permanently deleted user

Bronwen, I think the best way to do this is to
release multiple versions of the
plugin with different since-build and until-build
fields in the plugin.xml.


Using ApplicationInfo.getInstance().getBuildNumber() to determine which plugin implementation to load can reduce maintenance costs. I used this in a plugin which had to support IDEA 4.0 and 4.5 simultaneously, with quite a lot of common code.

1

Thank you for all of your help :)

0

请先登录再写评论。