Fork of coconutpalm’s XScalaWT project which is a Scala DSL for creating Eclipse RCP and SWT applications.
This fork mainly offers:
-
an sbt build (instead of Maven)
-
missing build functions for some UI elements
Eclipse dependencies are stored in p2 repositories which are not compatible with standard Maven/Ivy repositories.
The Eclipse Tycho project provides a set of Maven plugins for building Eclipse components with Maven.
Unfortunately there is no equivalent for sbt.
As a work-around, I have created an sbt task that downloads and installs the required artifacts in the local ivy repository; see below for details.
The current build compiles against Eclipse 4.5.1 (Eclipse Mars Release 1) libraries.
The first thing you’ll probably want to do is to check the build.sbt file to see if the SWT library matches your OS (Mac/Win/Linux); OS X is selected by default.
Note
|
You have to change the SWT library in two places: in the libraryDependencies and in the eclipseLibs .
|
Next step is to download and install the Eclipse libraries in your local repository with the provided task:
> installEclipseJars
Tip
|
you can also install the sources with the optional withSources=true argument
|
You should now be able to compile and publish xscalawt
in your local repository so that you can use it in your own projects:
> publishLocal
First, publish the library as described above, then add the following dependency in your build.
"org.ozb" %% "ozb-xscalawt" % "0.2"
You will also have to include Eclipse libraries; see libraryDependencies
in build.sbt
<dependency> <groupId>org.ozb</groupId> <artifactId>ozb-xscalawt</artifactId> <version>0.2</version> <scope>system</scope> <systemPath>${user.home}/.ivy2/local/org.ozb/ozb-xscalawt_2.11/0.2/jars/ozb-xscalawt_2.11.jar</systemPath> </dependency>
You will also need to include Eclipse libraries in your project that are compatible with those used by ozb-xscalawt;
see Tycho above; see libraryDependencies
in build.sbt
for a list of required libraries.
The example directory contains an example project using xscalawt
.
Check the readme for more info.