GroovySWT Add comment to Wiki View in Wiki Edit Wiki page Printable Version

GroovySWT is a wrapper around SWT, the eclipse Standard Widget Toolkit. It allows you to easily write Eclipse SWT applications by using Groovy's builder mechanism.

Here is some SWT code using native Groovy:

When you run this (see below for setup details), the result looks like:

Here is the same example using SwtBuilder - note that this example does more because it actually prints some text 'Hello' to standard output when you press the button:

Examples 

For a short example of using the JFace builder for creating a standard application see the TextEditor sample.

You can find about 70 examples in the example directory in subversion or you can download them here.

For a comparison of the groovy and java code see here or see the latest code in subversion.

Platform dependency.

Groovy-swt is not platform dependent, but SWT is. So you need to make sure that you are running a SWT matching the platform you are running the application on. You can download the appropriate SWT version at eclipse (select the eclipse version, find the heading "SWT Binary and Source", and download the SWT for your platform)

Releases:

See the changelog for changes.

0.5:

Updated to eclipse 3.5 (see the changelog for all the other changes)

Please note the 0.5 was completely re-written to use FactoryBuilderSupport (to be able to be included in griffon), so there may be a few inconsistencies with version 0.3, but if you find any then please let me know. You can see the changelog for a list of all the changes.

Another major new feature in version 0.5 is the binding framework (build on top of the jface databinding and following the same style as the swing builder). You can find a little documentation with examples here.

0.3:

The sources (and README.txt telling you how to set up the libraries and dll's) can be found in subversion:

The jar file compiled against Eclipse SDK 3.3 jars can be found attached:

To run groov-swt application you also need some of the eclipse libraries (including SWT), so download groovy-swt-0.3-including-Eclipse-libs.ZIP and unzip all the jar files into the lib directory of your groovy installation. This zip file includes the windows version of SWT, so if you are on another platform you need to download the appropriate version of SWT at eclipse and include that instead.

 

Search

Results of your search request can come from various sources: the Groovy website itself, the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.

  By  -  pages  -  views  - last modified