Skip to content

#805 PLCgen: Insert a text header at the start of the PLC program (1st attempt)

Somewhat organized by commit, although I do touch some files multiple times. It is likely small enough to read all in one diff.


  • Introduce a header text generator.
  • Add option to get the file path.
  • Add generator to the target.

Generator is just loading the file, sanitizing the input, and dumping the result into a provided code box. Alternatively (if no file was given or it was not found), generate a default header with the name, version, and time stamp.

As a side-effect, since the header is at the top of the generated code, all code below can simply start with adding an empty line before their content. The needsEmptyLine flag is not needed any more.

Closes #805 (closed)

Merge request reports