[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Adding, Removing, and Selecting a Marker

You can add or remove a marker in any of your text files using the facilities built into the CodeWarrior editor. Markers allow you to jump to specific points in a file, or leave notes to yourself about work in progress.


Adding a marker

To add a marker, move the text-insertion point to the location in the text that you wish to mark, then choose Add marker from the Marker Pop-Up Menu. The Add Marker dialog box, shown in Figure 5.9, appears.

Add Marker Dialog Box:

In the Name for new marker field, enter text that helps identify the location that you are marking. For example, you could enter a brief note, a comment, a routine name, or similar information.

Click Add to confirm the text in the field and add a marker at the text-insertion point. The text that you entered now appears in the Marker Pop-Up Menu, as shown in Figure 5.10.


TIP

If you select some text in a source file, then choose Add Marker, the selected text appears in the text field of the Add Marker dialog box. This shortcut is handy for quickly adding specific routines or lines as marker text.
Example Text File with an Added Marker:

Adding Markers with #pragma

There is another method for marking files on a more permanent basis. In C/C++ programs, you can use the following directive to create a marker:


  #pragma mark myMarker

In Pascal, you can use the following directive to create a marker:


  {$PRAGMAC MARK myMarker}

When embedded in your file, these examples automatically add myMarker to the Function Pop-Up Menu after you open the file in the editor.

Unlike the markers defined using the Marker Pop-Up Menu, markers defined with #pragma statements appear in the Routine pop-up menu.


Removing a marker

To remove a marker, choose the Remove markers command from the Marker Pop-Up Menu. The Remove markers dialog box shown in Figure 5.11 appears. After you select the marker that you wish to delete, click Remove to permanently remove the marker from the list. To close the Remove Markers dialog box, click Done to confirm your changes or click Cancel to discard your changes.

Remove Markers Dialog Box:

Jumping to a marker

To jump to a specific marker in your file, choose the marker's name from the Marker Pop-Up Menu. The IDE moves the text-insertion point to the marker's location and scrolls to that location if necessary.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000