Annotation Management

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.

Note: Annotation management is not available in lists corresponding to tag nodes in the information tree. That is, annotations listed in All tags, Items without tag, and nodes for specific named tags cannot be altered.

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.

Adding

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.

Modifying

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.

Removing

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.

Note: Multiple entries in the annotation list can be deleted by selecting them all prior to clicking delete.

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.

Note: Most changes made to annotations via the Information Tool are irreversible. However, changes made to annotations on a class or feature which is currently open in the Editor Pane may be reversed by using the editor's Undo command. The undo feature should be used with caution as the undo does not function in some early EIS versions.

cached: 11/21/2024 8:39:01.000 AM