Organize Code With Bookmarks and Tasks

Use markers in the IDL Editor to help you annotate and quickly retrieve information. Bookmarks flag places that you want to find easily, and Tasks help you track outstanding action items.

Bookmarks

Bookmarks are a simple way to navigate to resources that are used frequently. You can then quickly access bookmarks using the Bookmark view.

To place a bookmark within a file, right-click in the gutter on the left side and select Bookmark from the pop-up menu. The Add Bookmark dialog appears:

ed_bookmark.gif

Type the text that you want for the bookmark and click OK.

The resulting bookmark appears in the Editor gutter:

ed_bookmarkcode.gif

Tip
To create a bookmark for an entire file, select a file in Project Explorer, then choose Edit → Add Bookmark.

Accessing Bookmarks

You can see all the bookmarks in a project in the Bookmarks view. To display this view, select Window → Show View → Bookmarks. The Bookmark View appears below the IDL Editor area as a tab in the same area as the Console view.

ed_bookmarkview.gif

Notice in the Bookmarks view that bookmarks from different files in the project appear together. Click on any bookmark, and the IDL Editor opens the file and highlights the bookmarked line.

Tasks

Use Tasks to leave notes in the same file as the code. The task function works much the same as bookmarks. You can view and edit all the tasks in a project in one place using the Tasks view. You can use tasks in two ways; as a task marker outside of the code or as task tags in commented code.

Task Marker

To place a task within a file, right-click in the gutter on the left side and select Add Task... from the pop-up menu. The Properties dialog appears:

ed_taskdialog.gif

Type the text that you want in the Description field. Select a Priority from the pull-down list and click OK.

The resulting task marker appears in the Editor gutter:

ed_taskcode.gif

Task Tag in Commented Code

This method can be quicker to use when you're writing code. A task marker is created automatically when you add a task tag to a code comment. The default task tag definitions are:

FIXME

High priority

TODO

Normal priority

XXX

Low priority

Use these tags within commented code to define a task. The example below uses the TODO tag to set a Normal priority task:

ed_tasktag.gif

Note
Task Tags are defined in the Editor Preferences found under Window → Preferences → IDL → Editor. The Task Tags area shows the default text that is associated with High, Normal and Low priority tasks. You can edit these or use the default.

Accessing Tasks

You can view all the tasks in a project in the Tasks view, whether you've set them as markers or as tags within commented code. You must save the current file before all tasks will display in the Tasks view.

To display this view, select Window → Show View → Tasks.

ed_taskview.jpg

Notice in the Tasks view that tasks from different files in the project appear together. Double-click on any task to open the file in the IDL Editor to the bookmarked line. When a task is complete, click in the checkbox to the left of the task. The task still appears in the task list.

To create a task for an entire file, see "create a task for a resource" from the Project Explorer.