Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Is there a way to get the version from SWT
Is there a way to get the version from SWT [message #453330] Tue, 05 April 2005 13:17 Go to next message
Andy Arhelger is currently offline Andy ArhelgerFriend
Messages: 62
Registered: July 2009
Member
Is there a method or some easy way to get the version information from
SWT at runtime? I.E. 3.0.1 or 3.1? I know Spinner was introduced in 3.1
and I could check for that class but that seem rather crude.

Andy Arhelger
Re: Is there a way to get the version from SWT [message #453334 is a reply to message #453330] Tue, 05 April 2005 14:59 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
Andy Arhelger wrote:
> Is there a method or some easy way to get the version information from
> SWT at runtime? I.E. 3.0.1 or 3.1? I know Spinner was introduced in 3.1
> and I could check for that class but that seem rather crude.

SWT has another version numbering system. Not 3.0, 3.1. You can see the
version in the libraries:

On my WinXP box running Eclipse 3.1M6 I have:
swt-win32-3128.dll

SWT.getVersion() would thus return 3128 as the SWT version.

For more info look at SWT#getVersion() (though I don't know how much
info there is...)

HTH,
Christian
Re: Is there a way to get the version from SWT [message #453438 is a reply to message #453330] Tue, 05 April 2005 15:10 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
Andy Arhelger wrote:
> Is there a method or some easy way to get the version information from
> SWT at runtime? I.E. 3.0.1 or 3.1? I know Spinner was introduced in 3.1
> and I could check for that class but that seem rather crude.

To your Spinner problem:

The Spinner API was introduced in SWT Build 3.1 013 (2004-11-23) thus
the following should IMHO work (not tested, though):

if (SWT.getVersion() > 3113) {
// Spinner can be used
}

However, as there were some updates to Spinner for Eclipse 3.1M7 (Bug
86079 and new Spinner API) I would recommend a test like this:

if (SWT.getVersion() > 3128) { ... }

HTH,
Christian
Re: Is there a way to get the version from SWT [message #453439 is a reply to message #453438] Tue, 05 April 2005 15:11 Go to previous message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
> However, as there were some updates to Spinner for Eclipse 3.1M7 (Bug
> 86079 and new Spinner API) I would recommend a test like this:

Updates to Spinner for Eclipse 3.1M6 of course...
Previous Topic:Content Assistant
Next Topic:Controls getting too much space with TableWrapLayout in WizardPage
Goto Forum:
  


Current Time: Sat Jul 20 03:00:41 GMT 2019

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

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

Back to the top