Getting Started with Metrowerks Codewarrior (Part IV)
2 Apr 2004 - 21:08
Keywords :

The editor window is located on the right part of the screen and typically looks like this:

cwSplit-2.png

A file view can be split horizontally and/or vertically into several sub-windows. This is quite convenient if you need to edit a part of a file while viewing another part of the same file. You can unfortunately not mix several files in such type of view :-(. You have to use the windowed mode to do this which is slighly less nice:

cwWindowed.png

Without being the most advanced on the market, the editor itself has all the features you would require from a modern code editor:
-  customizable syntax highlighting
-  auto-indentation
-  smart braces and paranthesis
-  code completion

cwCompletion.png

Navigating in the code

cwheaderlist.pngThe Codewarrior editor also proposes three different tools to navigate in your code. All three are available from the small toolbar on the top of each editor window: cwNavTools.png

The first tool is the Header navigation. Clicking on the small .h icon while editing a cpp file, pops down the list of header files that are directly or indirectly included.

The list is sometimes a little bit long and its a shame you cannot restrict it to the list of headers written by you or directly included by your file.

An inteerstiong feature of this tool is that when you edit a header file, it will present all cpp files of your project that currently uses this header.

The second tool is the Function navigation and is available through the {} button. It presents the list of functions defined in your file:

cwFunctionList.png

cwMarker.pngAnd the last tool, may be a little bit less useful due to the ease of use of the two first ones, is the marker tool. This will let you define custom navigation point in your code ("markers"). Unfortunately a marker is only local to the current file: you cannot navigate between different files using these markers, which is rather annoying.

 


:<: Part III

AttachmentSize
cwCVS.png1.3 KB
cwSplit.png16.38 KB
Tutorial posted April 2nd, 2004 by eric

Submitted by weilaiyong on Thu, 2007-10-11 03:33.

thanks a lot !



copyright 2003-2009 NewLC SARL