Re-translate to Dolfin
Re-translate to Dolfin regenerates the Dolfin files from the current Turtle. Use it after you edited the origin Turtle by hand, or after adding a class there that has no Dolfin declaration yet.
It overwrites Dolfin files, so it always shows a preview first and never touches a file you did not tick.
Start it from the Re-translate to Dolfin… button in the origin Turtle’s toolbar, or from ⟳ Re-translate to Dolfin… in the origin file’s context menu in the file tree.
In a project with several Turtle sources, it acts on one source: the .ttl you started it from. Only the Dolfin files that source generated are compared, plus any existing file with the name of a file it produces. A file it writes joins that source’s files.
The dialog
The Turtle is translated exactly as at import, then compared with your current Dolfin files. Each file gets a status:
| Status | Meaning | Ticked by default |
|---|---|---|
| added | The Turtle now produces a file you do not have. | yes |
| modified | The generated file differs from yours. | yes |
| only in dolfin | You have a file the Turtle does not produce. Kept unless ticked (ticking deletes it). | no |
| unchanged | Identical. Listed collapsed. | no |
package.dlf is never ticked by default: your version, author and description are only overwritten if you tick it.
Shared files
A shared file also holds declarations from other sources. Re-translating one source must never remove them. If the file would lose a declaration that another source’s Turtle makes, its row cannot be ticked, and its note names the other source and the declarations:
shared with b.ttl: re-translating would drop its declarations (Person). Edit this file by hand instead
A declaration that both sources make is written as the source you re-translate makes it. If a shared file does not parse, its row is refused too.
Click a file name to see a side-by-side diff: current Dolfin on the left, after re-translate on the right.
The footer says how many files will be replaced. Confirm with Replace N file(s).
If the Turtle has a syntax error, the dialog shows it with its line and column and does nothing.
Safety
- Previous contents stay restorable from each file’s version history.
- Afterwards the project’s sync reference is set to the new Dolfin files, so the automatic sync that follows finds nothing to do and does not write anything back.
- Edits you saved in the last three seconds in files you did not tick are treated as already synced.
- If something fails halfway, the chip shows
error: partial re-translate — run Re-translate againand automatic sync is switched off. Run Re-translate again: files already written show as unchanged, and it finishes the rest. - The file limit still applies to added files (the origin Turtles and
package.dlfare not counted).