The Information Tool gives you the ability to add, modify, and remove annotations from within the tool. When you manage annotations via the Information Tool, the appropriate text changes are made to the annotation targets. So, for example, if you use the Information Tool to add an annotation to a class, you will see the annotation after a new EIS marker in the
note part of the class text.
Of course, you can also use the EiffelStudio editor or an external editor to manage annotations in Eiffel source code and configuration files using the annotation syntax described in EIS: Outgoing. The advantage to using the Information Tool is that the tool modifies the files for you, making the process less prone to error.
For each node in the information tree, the list of associated annotations is visible to the right. At the bottom the list, there is an entry that is blank, except for the Name column which contains an ellipsis (" ... "). Double clicking the blank line creates a new unnamed annotation. You can then modify the new entry as you wish.
Select a line in the annotation list, then click into a column you wish to change. This will activate editing/choosing mode. Now you can edit text in the column or if the column is a drop down list, you can choose an alternative entry. Once the editing area drop down list is deactivated, the modification is done and synchronized into code automatically.
By pressing Delete, or clicking the delete button on the bottom toolbar, you will delete any selected annotations in the list. This deletes the annotation entries from the list and also from the corresponding the Eiffel class or configuration text.
Enabling and disabling automatic annotation entries
Automatic annotations can be enabled for a particular project target. Once enabled, each class in the target will exhibit an implicit annotation with a particular source. You can define the source at the same time you enable automatic annotations for a target.
To enable automatic annotations, select the desired target in the information tree. When you do this, the button on the bottom toolbar with the automatic annotation icon becomes enabled. Click this button and you will see the Edit Automatic EIS Entry dialog box as in Figure 1.
Figure 1. The Edit Automatic EIS Entry dialog
You enable automatic annotations by checking the box labeled Enable Auto-Entry. You construct an appropriate source from explicit strings and/or variable names in the are labeled Source.
You can disable automatic annotation entries on a target by invoking the Edit Automatic EIS Entry dialog box and un-checking the Enable Auto-Entry checkbox.