Creation and Management of Generated Content
Adding Generated Content to a Chapter
Generated content is always added at the current cursor position of the active chapter. When the cursor is placed, do the following
right click on the artifact whose content should be
and then the concrete
representation. If there is only one representation
available, select the menu item instead. If the
artifact content cannot be inserted into the chapter, the
If the generated content can be configured, a dialog
with one or multiple configuration tabs opens. Perform all
necessary configuration steps and press
The generated content is now inserted in the chapter. Additionally, a new reference from the chapter to the artifact is displayed in the Project Explorer.
Identifiers such as Ecore class or attribute names can be added as generated content to the running text. Using the method from above would interrupt the writing flow too much, therefore DEFT provides an alternative, keyboard-only method to add identifiers. Press Alt+I to open a dialog with all available artifacts. Select the artifact which contains the desired identifier. Then a new dialog opens which lets you select the identifier. In both dialogs you can type the name of the identifier and use the arrow keys to navigate through the proposed autocomplete entries.
Deleting Generated Content
Generated content is deleted by just deleting its representation in the editor. After saving the reference in the Project Explorer is also deleted.
Editing Generated Content
The reconfiguration of already inserted generated content is not yet implemented. As a workaround delete the content and add it again.
Moving Generated Content
Generated content can only be moved within the same chapter. Select the generated content in the editor and move it to a new position with cut & paste. Be sure NOT to save the document between cutting and pasting or the internal reference will be lost, which means that the content cannot be updated automatically anymore. Pasting the generated content to another file will also delete the internal reference.
Updating Generated Content
Generated content (code listings, images, ...) is updated when the underlying artifacts (source code files, Ecore diagrams, ...) have been updated. Artifacts are updated in one of the following ways
Double click on the "Update Artifact ..."
task in the task list. An Update Artifact-Task is only
displayed when the source file of an artifact is different
from the artifact in the repository.
Right click on an artifact and select
Right click on an artifact and select
". A dialog
opens that lets you select a new source file for the
artifact. This can be useful if
the DEFT repository has been moved to another
computer where the source files are in a different
new versions of an artifact are stored in a
different source file. For example, some Ecore model
called "Model v2" is not updated when a new
version is written, but a new file called "Model
v3" is created instead. In order to update the
documentation, select "Model v3" in the
"Update With" dialog.
- the DEFT repository has been moved to another computer where the source files are in a different directory.
When the artifact has been updated, the following can happen to the generated content
Nothing. The generated content looks like before. It was
not affected by the artifact update.
Changed. The generated content looks different from
Error. The generated content could not be computed from
the updated artifact. A common reason is that the generated
content was meant to display a part of the artifact which does
not exist anymore, for example a method which has been deleted
All generated content which has been changed or could not be computed (error) is listed in the Task View.
For changed content you are asked to check the content and accept the changes. Double clicking on a Check task sets the cursor to the affected generated content. Note that an explicit comparison with the previous version of the generated content (such as highlighting differences in a diff view) is not implemented in the current version of DEFT. If the new generated content looks like expected you must explicitly accept the change by double clicking the corresponding "Accept changes" task in the Task View. If you would like to change the generated content, you have to remove it and add it again (see Sect. Editing Generated Content).
Similarly, if content could not be generated after the update you must remove the error message from the chapter and, if necessary, insert the content again.