Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse RCP product customization
Eclipse RCP product customization [message #823075] Sat, 17 March 2012 19:08 Go to next message
Musical Developer is currently offline Musical DeveloperFriend
Messages: 4
Registered: March 2012
Junior Member
We are facing a situation where we are packaging an eclipse rcp.

To support, muti-user usage, we have allowed user-specific workspace creation, using:


version number (specified in the .product file in the main plugin) is being used to distinguish between older workspaces...

The goal is to delete the older workspaces during a new launch of a just installed product.

For that I seem to be needing two things:

-product version number (that currently sits in the aboutText branding property)
-doing this deletion only once (the first launch of a new installation)

So, my question is:

1. From the IProductConstants I am not able to find a property called "aboutVersion"
just like "aboutText", so how do I then get the version_num at runtime? This will help me create a path to the older workspace which I can then delete...

2. How do I detect the first launch of a newly installed there support in the API already?

If not, my current idea is to have a preference (Defaulted) and then change it ...that sort of simulates the first launch detection....

3. Am I on the right track, is this a recommended way of dealing with the above problem?

Re: Eclipse RCP product customization [message #824240 is a reply to message #823075] Mon, 19 March 2012 12:31 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
You need to get the IProduct instance via Platform.getProduct().

There's no API that I'm aware of for checking first-load, but you can easily write your own check in your IApplciation class using the preferences.
Re: Eclipse RCP product customization [message #824298 is a reply to message #823075] Mon, 19 March 2012 14:02 Go to previous message
Musical Developer is currently offline Musical DeveloperFriend
Messages: 4
Registered: March 2012
Junior Member
Thanks for your prompt reply Brian.

So, before posting here, I did try (what Brian has suggested). On application launch, I am able to retrieve the version number (using some textual parsing of aboutText property) using the getBrandingProperty() method defined in IApplicationContext.

My followup questions related to this are:

1. The version number that gets transferred to "aboutText" property in plugin.xml when I hit synchronize on the App.product "overview" gui, is that available as a separate property by default?

As of now, the only properties that are default available seem to be:

ABOUT_IMAGE, ABOUT_TEXT,APP_NAME and others but no version number...

2. So, I tried a workaround for this defining my own property (in the runtime.products extension) in plugin.xml called "VersionNumber"

This works fine since I am able to retrieve this in getBrandingProperty("VersionNumber") during application launch...but I am having to enter the version number manually in plugin.xml

But, I am wondering if I can specify (linkage) for "Version" in App.product and the corressponding "VersionNumber" property (that I have defined) in plugin.xml

3. Basically, I would like to change the version number in the App.product "overview" gui, then hit "synchronize", this should ideally transfer the
version number to both following positions in plugin.xml:

1. aboutText property (this is happening by default)
2. "VersionNumber" property (not happening)

Without this linkage, I would then need to change the version number in two locations
before exporting product...(would like to avoid that)

4. Also, as an aside, I noticed that the .eclipseproduct (after exporting the product) that is created contains the version of the launcher plugin. Is that by design, I would think it should contain the version number specified in App.product, no?

[Updated on: Mon, 19 March 2012 14:03]

Report message to a moderator

Previous Topic:Eclipse plugin caching
Next Topic:Console with prompt
Goto Forum:

Current Time: Mon Mar 27 00:44:11 GMT 2017

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

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