Skip to content

Navigation Menu

Sign in
Sign up

4diac-IDE Headless Mode: Generate FORTE cpp/h Files from IDE on the Command line. #2399

diplfranzhoepfinger started this conversation in Ideas
Discussion options

I was about to suggest, that we get a "Headless Mode" for the 4diac IDE.
and, after some trying, i realized: it is already there (or at least almost)

maybe somebody has suggestions for improvements, or error Corrections, but, generally it is working that way:

Documentation: 4diac IDE Headless FORTE Export

This project demonstrates the automated control of the 4diac IDE via the command line to import projects, validate them, and export C++ code for FORTE.

Directory Structure

  • 4diac IDE: /home/franz/git/proj_4d_headless/4diac-ide
  • Workspace: /home/franz/git/proj_4d_headless/4diacIDE-workspace
  • Project: test_proj_4d

Components

1. Control Script (run_4diac.sh)

A shell wrapper that calls the 4diac IDE binary with headless parameters:

  • --launcher.suppressErrors: Prevents GTK/SWT error popups.
  • -vmargs -Djava.awt.headless=true: Ensures Java does not request graphical resources.

2. Ant Build Configuration (build.xml)

Defines the automation workflow:

  • import: Uses <fordiac.importProject> with the projectPath attribute.
  • build: Forces an Eclipse build using <eclipse.incrementalBuild> to trigger internal 4diac validators.
  • export: Uses <fordiac.exportProjectFBs> with the projectName attribute to generate FORTE C++ code.

Lessons Learned

  • Attribute Names: 4diac Ant tasks use different naming conventions for paths (projectPath vs. projectName), discovered directly from the plugin source code.
  • Validation: An explicit build step is required in headless mode, otherwise 4diac might not provide the error markers to the Ant tasks reliably.

Execution

./run_4diac.sh

The exported files are located in the export/ folder within the project directory.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /