# Function Tag Window

The Function Tag window provides a list of function tags defined in the currently open program. It will also show which tags are assigned to the currently-selected function. Tags may be created by the user, or loaded from a predefined set (see section on loading tags below).

To display the Function Tag window, select the WindowFunction Tags option on the tool menu. Optionally, the dialog may be activated by right-clicking on a function header in the listing and selecting the Edit Function Tags option.

## Window Components

> This window has five distinct sections:

> - Available Tags List: Displays all tags that are available to assign to the current function.
> - Assigned Tags List: Displays all tags that have been assigned to the current function.
> - Tag Input Field: Allows users to create new tags. Multiple tags may be created at one time.

> - Filter Field: Allows users to filter what is shown in the Available and Assigned tag lists.

> - Action Buttons
> - Assigns the selected tag(s) to the current function
> - Removes the selected tag(s) from the current function
> - Deletes the selected tag(s) from the program and removes them from all functions

## Tag Operations

> ### Create

> > Tags can be created by using the Tag Input Field described above. Users may enter multiple tag names delimited by a comma. All newly-created tags will be displayed in the Available Tags List and are NOT assigned to any function.

> > Each tag may have an associated comment that is visible as a tooltip. This can be assigned after the tag has been created (see `edit` section below).

> ### Delete

> > Tags may deleted by selecting a set of tags and pressing the icon. Users will be prompted with the following:

> > If confirmed, the tag will be removed from the system and from all functions to which it had been assigned.

> ### Edit

> > Tag names and comments may be edited by double-clicking the item in the list. If the tag is not editable the user will be presented with the following warning:

> > .

> > If editing is allowed, the following dialog will be shown:

> ### Add to Function

> > Tags may be added to a function by selecting a set of tags and pressing the button. The tags will be removed from the Available Tags List and added to the Assigned Tags List.

> ### Remove from Function

> > Tags may be removed from a function by selecting a set of tags and pressing the button. The tags will be removed from the Assigned Tags List and added to the Available Tags List.

## Loading External Tags

> Tags may be loaded on startup from an external source if desired. These will be shown in blue and cannot be edited or deleted, with one caveat: once a tag has been assigned to a function it ceases to have any special protections and can be edited/deleted just as any other.

> To make these available there must be a file named functionTags.xml available on the classpath. Edit (or create) this file and add tags as needed. The format is as-follows:

>        <tags>
>           <tag>
>              <name>TAG1</name>
>              <comment>tag comment</comment>
>           </tag>
>           <tag>
>              <name>TAG2</name>
>              <comment>tag comment</comment>
>           </tag>
>        </tags>

> Be aware that any external tags that have removed/edited will reappear with Ghidra is restarted, as these are always loaded from this file.

Provided By: FunctionTagPlugin

Related Topics:

- Functions