The navigation dropdown helps you organize your code and navigate more easily inside your classes and methods:
Some tags are added automatically, and you can complement the dropdown list using markers.
Click an item in the dropdown list to go to its first line in the code. You can also navigate with arrow-keys and press Enter.
Constructors, method declarations, functions and computed attributes are automatically tagged and added to the dropdown list.
When there is no tag in the class/method, the tool displays "No tag".
The following items are added automatically:
|Class constructor or method declaration|
|Computed attribute (get, set, orderBy and query)|
|Class function name|
By adding markers in your code, you can add the following tags to the dropdown:
You declare them by adding comments such as:
// FIXME: Fix following items
Declarations are not case-sensitive; writing
fixme: has the same effect.
Adding a hyphen after the
MARK: tag draws a separating line in the code editor and the dropdown menu. So writing this:
Results in this:
All markers located inside functions are indented in the dropdown list, except for the
MARK: tags located at the end of functions and not followed by instructions. Those will appear at the first level.
Tags are displayed in their appearing order inside the method/class.
To display the tags of a method or class in alphabetical order, do one of the following:
- right-click the dropdown tool
- hold Cmd on macOS or Alt on Windows, and click the dropdown tool
Tags inside functions move with their parent items.