Building and Running 4DIAC-IDE from Source
Run through the following steps to build and execute the 4DIAC-IDE from source:
- Get the development environment
- Check out the 4DIAC-IDE repository
- Import plug-ins into workspace
- Get the 4DIAC-LIB
- Run in development mode
Get the Development Environment
Eclipse Kepler (or later) use Eclipse Modeling Tools edition.
In addition to the default Modeling Tool package you will need to following Eclipse Plug-ins. These can be installed via Help → Install Modeling Components.
- Xpand
- Graphical Modeling Framework (GMF) Tooling
- Xtext
Check out the 4DIAC-IDE Repository
This section shows how to check out (clone) the 4DIAC-IDE repository using TortoiseHG. Details on TortoiseHG can be found here.
- Create a directory on your filesystem
- Right mouse click to that directory
- Select TortoiseHG/Clone

- Specify Source Path ssh://@hg.code.sf.net/p/fordiac/fordiac-ide (for anonymous read only access to the repository you can also use the path: http://hg.code.sf.net/p/fordiac/fordiac-ide)

- Press Clone button
Import Plug-Ins into Workspace
- File > Import > Existing Projects into Workspace
- Select the Source Directory from the file system and select all Plug-ins to be imported.
- Wait till Eclipse finished building the project (look at the progress bar at the right bottom corner of the Eclipse main window)
- 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

Get 4DIAC-LIB
Currently the 4DIAC-LIB includes:
- IEC 61499 specific function blocks
- All IEC 61131-3 functions and function blocks
- Some OSCAT functions and function blocks
To use the existing 4DIAC-LIB within the 4DIAC-IDE run through the following steps:
- Use tortoiseHG to clone the library from: http://hg.code.sf.net/p/fordiac/fordiac-lib
- Simply copy the contents of the library into your projects or into the Tool Library directory of your 4DIAC-IDE (folders of the Windows explorer can directly be copied into the Type Navigator View)
- OR Select all (for existing libraries in the project) and refresh
Run in Development Mode
- Open the 4DIAC-IDE.product from the org.fordiac.ide.product plug-in.

- In the Testing Section of the Overview tab press Synchronize
- To use 4DIAC-IDE directly under this (development) Eclipse you need a type library and templates
- For the type library you need to put the typelibrary" folder into the directory with your eclipse.exe. How to get the default typelibrary is described here.
- For the templates copy the templates directory from the 4DIAC download into the directory with your eclipse.exe
- Press Launch an Eclipse Application in the Overview
Building your own 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 with the developments performed in the Mercurial 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.