8. Editing node attributes

8.1. Old interface
8.2. New interface

Double-clicking any attribute value displayed in the tree shows a simple value editor, where the value of the attribute can be changed (note however that some annotation modes disable editing certain or all attributes - in that case, the value editor presentes the attribute value as read-only).

Usually not all attributes are displayed in the tree. In that case it is necessary to use the Edit Node dialog, which can be invoked either by double-clicking on the desired node in the tree, by activating the node and pressing Enter, or by activating the node and selecting NodeEdit Node Attributes... from the menu.

The Edit Node dialog shows all attributes defined for the type of the node or for the file and their corresponding values at the selected node. Depending on the type of the file, the dialog may have one of two possible interfaces, here refered to as the old interface (see Figure 3, “The old interface”) and the new interface (see Figure 4, “The new interface”).

8.1. Old interface

Displays the dialog box Edit Node, listing all attributes defined for the type of the node or for the file and their corresponding values at the active node. Depending on the type of the file, the dialog may have one of two possible interfaces, here refered to as the old interface (see Figure 3, “The old interface”) and the new interface (see Figure 4, “The new interface”).

The old interface supports attributes of the following types: strings, |-separated lists of strings, enumerated values, and |-separated lists of enumerated values. In the old interface, only plain string values can be edited directly. Any other attribute value can be edited in a dedicated sub-dialog, which appears after clicking on the button labeled ... beside them.

Figure 3. The old interface

edit node dialog

8.2. New interface

The new interface (now default for PML-based files and files in FS format) offers support for string attributes, enumerated attributes, constant attributes, Treex::PML::List lists of values of an arbitrary type, Treex::PML::Alt alternatives of values, and Treex::PML::Seq sequences of named elements), and, most importantly, for hierarchical attributes (Treex::PML::Struct and Treex::PML::Container). Alternatives consisting of |-separated lists of strings used by FS format files are supported too.

Colors are used to visually differentiate items and buttons of various data types. Specifically, required attributes are listed in blue, other attributes are brown. Pale yellow background is used for structures and containers, pink for lists, green for alternatives, and blue for sequences. Orange color is used for |-separated alternatives.

Figure 4. The new interface

edit node dialog

In this interface, the hierarchy of attributes is presented as a collapsible tree. The leafs of the tree represent the editable (string or enumerated) values.

Enumerated values can be selected from a combo-box with a search-as-you-type functionality. Lists, alternatives, sequences and/or their members have additional buttons beside their tree-entry for adding new members, removing members, and altering the order of members, as listed in Table 1, “Buttons in the new Edit Node interface”.

Table 1. Buttons in the new Edit Node interface

ButtonKeyboard shortcutDescription
+
Ctrl++ add a new member to a list
-
Ctrl+- remove the current member from a list
up
Ctrl+up move the current member up in an ordered list
down
Ctrl+down move the current member down in an ordered list
*
Ctrl+* add an alternative value
x
Ctrl+/ remove the current alternative value
#
Ctrl+# create/delete a structure
+
Ctrl++ add a new element to a sequence (a menu pops up to select name)
-
Ctrl+- remove the current element from a sequence
up
Ctrl+up move the current element up in a sequence
down
Ctrl+down move the current element down in a sequence
*
Ctrl+* add an alternative value to a |-separated FS-alternative
x
Ctrl+/ remove the current value from a |-separated FS-alternative