SADL Version 3 Build Instructions
Last revised
09/03/2020.
Introduction
This document provides step-by-step instructions for creating an Eclipse Plug-in
Development Environment for the SADL grammar and IDE. Below are described setup
steps, followed by two different ways of installing Eclipse, followed by steps
to be taken after installing Eclipse, regardless of which method of installation
was followed. These instructions are for setting up a development environment on
a local machine. This development environment can then be used to generate new
SADL updates, to make modifications/extensions to the SADL code, or to create
new Eclipse plug-ins to create extensions to the SADL grammar/IDE.
Setup Steps
- Create a folder in the local file system under which the source code and
Eclipse workspace will be located. (For example, on MS Windows this might be
"c:\sadl".) This folder will be referred to as DEV-HOME.
- Create a folder under DEV-HOME named "git".
- Clone the SADL github repository under DEV-HOME/git.
- Using the Git Bash client, change directory so that the DEV-HOME/git is
the current directory
- Make a folder named "sadlos2"; change directory to this folder
(DEV-HOME/git/sadlos2)
- Go to SADL project on github.com: https://github.com/crapo/sadlos2/
- Copy the URL for cloning by clicking on the button "Clone or download"
- Using the Git Bash client, type "git clone " and then paste in the URL
copied in the previous step
- Download and install (if not already present) the Java 9 or later
JDK (see https://www.oracle.com/technetwork/java/javase/downloads/index.html).
- Install Maven so that builds can be run from the command line
- Download and install Maven 3.5 or later from
http://maven.apache.org/download.html.
- Configure proxies if
necessary by editing .../.m2/settings.xml under your user folder
- Make sure Maven is on the
classpath. Check in a cmd window with "mvn -version".
- Install Eclipse 2020-03 by one of the methods below.
Method 1: Install Eclipse by Direct Download
- Download and install "Eclipse IDE for Java and DSL Developers" (see https://www.eclipse.org/downloads/packages/).
Eclipse 2020-03 is recommended but newer versions should work.
- Configure proxies if behind a firewall (Preferences -> General -> Network
Connections)
Method 2: Install Eclipse Using the Eclipse Installer
- Download the Eclipse Installer
- Change to Advanced Mode
- Configure proxies if behind a firewall (mouse over icons on lower left
corner until the one for Network Proxies settings is found)
- Select Eclipse DSL Tools as Platform
- Select 2020-03 or later as version
- Finish
Build the Projects
- In a command line window, change directory to the folder in which the SADL
source code was installed from github (.../git/sadlos2).
- Change directory to sadl3 (.../git/sadlos2/sadl3).
- Change directory to the parent project (.../git/sadlos2/sadl3/com.ge.research.sadl.parent)
- Do a clean by typing the commend "mvn clean". Let it finish and verify
that there are no errors.
- Do a build by typing the command "mvn install -U". Let it finish and
verify that there are no errors.
Configure Eclipse
Start Eclipse and configure as follows:
- Make the Java JDK installed above the default JRE (Window -> Preferences
-> Java -> Installed JREs -> Add, then browse to the folder where the Java JDK
is installed, select. Once added, check to make default.)
- Switch workspace to DEV-HOME/ws (File -> Switch Workspace -> Other...,
then Browse to and create folder "ws".
- Import as Maven projects
(File -> Import... -> Maven -> Existing Maven Projects):
- Browse to .../git/sadlos2/sadl3/com.ge.research.sadl.parent
- Select the parent project and all projects under it
- Select all imported projects in the Package Explorer window and do a Maven
Project Update (right-click on the selected projects, select Maven -> Update
Project...)
- Set the target platform to com.ge.research.sadl.target
- Window -> Preferences -> Plug-in Development -> Target Platform, check "com.ge.research.sadl.target
(if two appear chose the one in the target, not parent, project), then click "Apply and Close"
- or
- Open the file "com.ge.research.sadl.target" in the project "com.ge.research.sadl.target",
click on "Load Target Platform" in the upper-right corner.
- Make sure that Build Automatically... is checked (on the toolbar's Project
dropdown menu, "Build Automatically should be checked; if not check it)
- With all projects selected, clean and build all projects (Project ->
Clean...)
Validating the Build Environment
At this point there should be no errors in any of the projects.
- Right-click on any of the projects and select Run As -> Run
Configurations... or Debug As -> Debug Configurations.
- Create a new configuration under Eclipse Application.
- Click on Run or Debug.
- A new instance of Eclipse should start with the SADL plug-ins installed.