Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » is there a API to get the version of the Eclipse Platform?
is there a API to get the version of the Eclipse Platform? [message #286025] Tue, 31 May 2005 16:28 Go to next message
Eclipse UserFriend
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 #286029 is a reply to message #286025] Tue, 31 May 2005 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Oh, yeah,
this one seems better:

Platform.getProduct().getDefiningBundle().getHeaders().get(o rg.osgi.framewor
k.Constants.BUNDLE_VERSION)
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 Go to previous message
Eclipse UserFriend
"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.
Previous Topic:Ant task not updating progress monitor
Next Topic:Problems with resource rename or delete
Goto Forum:
  


Current Time: Tue Nov 04 06:14:09 EST 2025

Powered by FUDForum. Page generated in 0.04054 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top