| is there a API to get the version of the Eclipse Platform? [message #286025] | 
Tue, 31 May 2005 16:28   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi all, 
I was looking for a API to get the version of the eclipse platform, but 
couldn't find it. Just wonder is there one? 
 
Below is some working around I found: 
1. read the "version" key in .eclipseproduct file in the install location. 
2. read and parse Platform.getProduct().getProperty("aboutText"), there is a 
version number in it. 
3. determin the eclipse version by some core plugins, like org.eclipse.sdk. 
 
Thanks.
 |  
 |  
  | 
 | 
| Re: is there a API to get the version of the Eclipse Platform? [message #286031 is a reply to message #286025] | 
Tue, 31 May 2005 17:04   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
"Hangsu Ma" <hangsuma@ie.ibm.com> wrote in message 
news:d7ihnb$99d$1@news.eclipse.org... 
 
All you see in the about page comes from the product extension aboutText 
property , but is not much structured. 
It is  a productBlurb ;-) 
 <extension id="ide" point="org.eclipse.core.runtime.products"> 
    <product name="%productName" application="org.eclipse.ui.ide.workbench" 
description="%productBlurb"> 
    <property name="windowImages" value="eclipse.gif,eclipse32.gif"/> 
    <property name="aboutImage" value="eclipse_lg.gif"/> 
    <property name="aboutText" value="%productBlurb"/> 
    <property name="appName" value="Eclipse"/> 
    <property name="preferenceCustomization" 
value="plugin_customization.ini"/> 
    </product> 
</extension> 
 
> 1. read the "version" key in .eclipseproduct file in the install location. 
Not reliable AFAIK it is completely ignored. 
 
> 2. read and parse Platform.getProduct().getProperty("aboutText"), there is 
a 
> version number in it. 
Not structured, but somewhat reliable. You need to parse both the version 
AND the build id. 
At least exactly what you see  in the about page. 
 
> 3. determin the eclipse version by some core plugins, like 
org.eclipse.sdk. 
org.eclipse.platform is the product plugin (extending 
org.eclipse.core.runtime.products) and the products should be waht you look 
for. There could be more than one BTW! 
So you should be able to get the product plugins version from a getProduct, 
and get the version of that plugin, or get to its feature version. 
 
And get the build id indirectly from system propertiy eclipse.buildId for 
the build ID (the only REAL version number) (but in fact the O in 
org.eclipse.platform/about.mappings) displayed in the about dialog... 
This will work only for eclipse, but not for other products...AFAIK.
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.17226 seconds