Building Eclipse plugin (developers)

Compiler (optional, can also be downloaded)

The plugin includes the compiler, which needs to be build first:

Follow the instructions for building the non-Java compiler Download/WebDSLOnLinux / Download/WebDSLOnMac, with 2 additions:

Install strc-java in addition to the other Nix packages:

nix-env -i aterm java-front sdf2-bundle strategoxt strc-java

Instead of ./configure --disable-shared --prefix=/usr/local, use:

./configure --enable-java-backend

To speed up compilation, or work around heap space issues in javac, use the Eclipse Java Compiler. Create a ~/scripts/ecj file:

#!/bin/sh -e
ECLIPSEHOME=~/eclipse
ECJJAR=`find $ECLIPSEHOME/plugins -name "org.eclipse.jdt.core_*"`
java -Xmx512m -Xms100m -server -XX:+UseParallelGC -cp $ECJJAR org.eclipse.jdt.internal.compiler.batch.Main "$@"

Set ECLIPSEHOME to the eclipse directory, and add ~/scripts/ to the path in ~/.profile or ~/.bash_rc:

export PATH=$HOME/scripts/:$PATH

Make the ecj file executable:

chmod +x ecj

The WebDSL Makefile will use the ecj command if it is available.

Plugin

dependencies

1 Install the latest version of the Spoofax language workbench Eclipse plugin: http://strategoxt.org/Spoofax/Download

2 Check out the Acoda project from SVN:

https://svn.strategoxt.org/repos/structure-evolution/trunk

Run the buildJava Ant task in build.xml.

Install required Eclipse features

Go to 'Install New Software' Select update site:

Helios - http://download.eclipse.org/releases/helios

Install the following features from the section 'Web, XML, and Java EE Development':

- JST Server Adapters
- JST Server Adapters Extensions
- JST Server UI
- JST Web UI
- WST Server Adapters

WebDSL plugin

Check out the WebDSL editor project from SVN:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor

Copy import.webdsl.default.properties to import.webdsl.properties and set the directories to the location of the Java build of WebDSL. Also set acoda.home to the Acoda project location.

If only the plugin needs to be build without changes to the compiler, download the compiler zip file from http://hydra.nixos.org/job/webdsl/trunk/buildJavaZip/latest. and extract it. Copy import.webdsl.from-install-dir.properties to import.webdsl.properties and replace @@webdsl@@ with the location of the extracted zip file.

The acoda component is optional, if available set acoda.enabled=true in import.webdsl.properties.

Run the all.release ant task or simply build the eclipse project (shortcut mac: cmd+b other: ctrl+alt+b).

After building, the editor should be automatically loaded in the same Eclipse instance.


Deploy the plugin using the feature project:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor.feature

and the update site project:

https://svn.strategoxt.org/repos/WebDSL/webdsl-editor/trunk/webdsl.editor.updatesite