Building and Running 4diac IDE
You have 2 options for building and running 4diac IDE:
1 Building and Running 4diac IDE from Source
Run through the following steps to build and execute the 4diac IDE from source:
1.1 Get the Development Environment
-
The 4diac IDE requires at least a version 25 Java JRE.
TipThe currently required Java version can be found in the pom.xml file in the root directory of 4diac IDE. The value in the <maven.compiler.source> tag in the properties section (as well as <maven.compiler.target>) is the determining factor. Higher version JREs are supported, but may require additional Eclipse IDE configuration (see step 4 of chapter Import plug-ins into workspace).
-
Get the latest Eclipse IDE. Use Eclipse IDE for Java and DSL Developers edition. Please make sure to select this edition, as using other editions may cause issues and setup problems. With this edition, you’re all set to go.
If you already have a version of the Eclipse IDE installed and would like to use it, make sure it has the required packages installed. In order for all dependencies to resolve correctly, the additional Eclipse packages listed below are required. To check, select Help > About Eclipse IDE
-
Modeling Project
-
M2E - Maven Integration for Eclipse
-
M2E - PDE Integration
-
EGit
-
XText Complete SDK
You can install these packages using your Eclipse IDE by selecting Help > Install New Software…. Select
Latest Eclipse Simultaneous Release - https://download.eclipse.org/releases/latestin Work with drop-down list. You can filter the results by typing maven or xtext.
-
|
Tip
|
To receive valuable tips and suggestions for improving the source code, we strongly recommend installing SonarQube for IDE from the Marketplace. Select Help > Eclipse Marketplace… and type SonarQube into the search field.
|
1.2 Check out the 4diac IDE Repository
Eclipse IDE has Git directly integrated. It’s common to use two separate folders, one for the workspace settings and one for the source code. . change to the Git perspective within Eclipse
+
. select Clone a Git repository
. select Clone URI
. copy https://github.com/eclipse-4diac/4diac-ide.git into the URI field. All other relevant information fields will be auto-completed.
+
. select the branches release, develop and the latest milestone branch (the highest number), named like z.y.x. At the time of writing this documentation, the latest milestone branch was 3.3.x.
+
. Make sure that develop is the initial branch, name the remote branch upstream, and select clone submodules.
+

If you require further instructions on cloning a repository, you can find them in the Eclipse EGit documentation. More information about contributing can be found in the contributing guidelines
1.3 Import Plug-Ins into Workspace
-
change to the Git perspective within Eclipse (if they aren’t already in perspective)
-
right click on the 4diac IDE Git repository and select Projects > Import Projects… that opens a dialog. Select everything within this dialog except the following ones:
NoteThe first part of the path — in this case, 4diac-ide_ECC — might have a different name on your system. It displays the name of the folder where the cloned repository is located. -
Wait till Eclipse finished building the project (look at the progress bar at the right bottom corner of the Eclipse main window).
-
Make sure the compiler compliance level is set to the current JDK version, see Section 4diac IDE requires in order for the build to succeed. Go to Window > Preferences. Search for "Compiler" and in the "JDK Compliance" section, set "Compiler compliance level" to the current version. If this step has not been completed properly the "Problems" view will be populated with "XText" errors. If you don’t see this view, select Window > Show View > Other > General > Problems.
-
Check problems view for errors. If you get API Baseline not set errors you need to perform the following steps:
-
Open the Eclipse preferences: Window > Preferences
-
Enter API in the top left search field. You should get three research results: 1. API Baselines, 2. API Errors/Warnings, and 3. API Use Scans
-
You now have two options:
-
Set an API Baseline for your developments:
-
Select: API Baseline
-
Click Add Baseline …
-
Enter a name, e.g., MyEclipse
-
For the location select your Eclipse directory
-
Press Finish
-
Select your new baseline in the API Baselines window and press OK
-
-
Set the API Baseline error to ignore:
-
Select: API Baseline
-
Set the option Missing API Baseline: which can be found in the bottom of the preferences window from Error to Ignore

-
-
-
|
Note
|
If you get an error in the "Problems" view stating "There is a possible API baseline mismatch …", you can safely ignore this message. This message will not prevent the IDE from building successfully. |
1.4 Set Target Platform
-
Expand the project
org.eclipse.fordiac.ide.productand open the target configurationorg.eclipse.fordiac.ide.product.target:
-
Wait until the target platform is resolved or press and wait until it is resolved.
-
Press within the upper right corner and wait until the workspace is built.
-
To use 4diac IDE directly in development mode, you need to provide a type library and templates. These are located in the
datadirectory of your cloned repository.-
Navigate to
org.eclipse.fordiac.ide/data/in your file explorer and copy thetemplateandtypelibraryfolders. -
Navigate to your active Eclipse workspace folder.
NoteThe
.metadatafolder inside the workspace is hidden by default.-
Windows: Enable "Hidden items" in the View menu of File Explorer.
-
macOS: Press
Command + Shift + .to toggle hidden files. -
Linux (Gnome): Press
Ctrl + Hto show hidden files.
-
-
Paste the copied folders into the following directory:
.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/
-
1.5 Run in Development Mode
-
Open the
org.eclipse.fordiac.ide.productfile from theorg.eclipse.fordiac.ide.productplug-in.
-
In the section of the Overview tab, press .
-
Press in the Overview tab.
Building your own 4diac IDE
A big drawback for running 4diac IDE from source is that you need at least 2 Eclipse instances running. Especially on systems with little memory this can be an issue. If you still want to keep up with the developments performed in the Git repository it makes sense to build a binary package. See Building a binary 4diac IDE package from source for details on how this can be achieved.
In addition we offer a nightly build of 4diac IDE here.
2 Building a Binary 4diac IDE Package from Source
For building a binary 4diac IDE package from the source code the best is to use the Maven configuration which is also used to build 4diac IDE on our build server. A modern Eclipse IDE comes with Maven integration out of the box. Then the necessary steps for generating binary 4diac IDE packages are:
-
Have the 4diac IDE source code in an Eclipse workspace as described in Building and Running 4diac IDE from Source
-
Go to the root project
org.eclipse.fordiac.ideand right-click on the pom.xml -
Invoke the Run As > Maven Install.
-
After a successful build you will find the output in
plugins/org.eclipse.fordiac.ide.product/target/productsdirectory.
Alternatively you can run mvn clean install on the command line in the root folder of 4diac IDE source code.
|
Note
|
When running UI tests directly from an IDE (e.g. Eclipse) on macOS, you must manually add -XstartOnFirstThread to your JVM arguments. This is handled automatically by a Maven profile when building from the command line.
|
