Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Get Plugin-Version String from within eclipse
Get Plugin-Version String from within eclipse [message #760818] Mon, 05 December 2011 11:07 Go to next message
Alexander  is currently offline Alexander Friend
Messages: 2
Registered: December 2011
Junior Member
Hi there,

searched all over the web, but didn't find anything regarding my problem.

I'd like to write a plugin with a new menu and there an "about" menu entry. There I'd like to see the actual version of my plugin. I.e. if I set the Version in the project settings to "2.4.1.alpha", I'd like to see this string in an about message box opened from the menu entry.

Is there a way to do this?

Thanks in advance
Alex
Re: Get Plugin-Version String from within eclipse [message #761293 is a reply to message #760818] Tue, 06 December 2011 08:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

Alexander wrote:
> I'd like to write a plugin with a new menu and there an "about" menu
> entry. There I'd like to see the actual version of my plugin. I.e. if I
> set the Version in the project settings to "2.4.1.alpha", I'd like to
> see this string in an about message box opened from the menu entry.
>
> Is there a way to do this?
I do this by the following snippet:

Version version = YourPlugin.getDefault().getBundle().getVersion()

Is this what you need?

best regards,
Gilbert
Re: Get Plugin-Version String from within eclipse [message #761908 is a reply to message #761293] Wed, 07 December 2011 09:09 Go to previous message
Alexander  is currently offline Alexander Friend
Messages: 2
Registered: December 2011
Junior Member
Yep, that's it! Thanks for the support.

To make it clear for other people, I used a slight different line:
String sVersion = MyPluginPackage.Activator.getDefault().getBundle().getVersion().toString();
Previous Topic:RCP Exception
Next Topic:Missing Constraint:... org.apache.lucene; bundle-version=[1.9.0;2.0.0)
Goto Forum:
  


Current Time: Fri Mar 29 08:24:07 GMT 2024

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

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

Back to the top