2.
Using the smart editor
Prev Next

The editor is the key component of CodeGuide. It offers a vast assortment of smart, language aware features. Besides that it offers all of the standard editor functionality: Unlimited undo and redo, syntax highliting for Java, HTML, XML, IDL and C/C++, automatic indentation and source code formatting, search and replace including Perl 5 regular expressions and bookmarks. The behavior of these features can be configured in the application preferences dialog (see Other preferences).

One of the most powerful features of CodeGuide is the instantaneous error detection. CodeGuide uses advanced incremental compiler technology to check the correctness of your programs as you type. Whenever an error is detected CodeGuide will display it in this way:

Instantaneous error detection

The error is underlined red in the code. There also is a little red line in the vertical scrollbar displaying the position of the error in the file. A red cross behind the file name in the open files list indicates that the file is erroneous. When the file is correct a green check is displayed instead of the cross.
To display the text of the error move the caret on the line containing the error and press F1. This will bring up a popup which shows the error text.
You can easily move the caret from error to error: Press CTRL+DOWN to jump to the next error and CTRL+UP to jump to the previous error in the file.
Normally all open files which belong to the current project are checked. You can change this behavior in the application preferences dialog (see Code analysis preferences).

Language aware code completion is an extremely powerful coding feature. It means that when you have an incomplete code expression it can be completed automatically or if this is not possible all possible completions can be displayed. CodeGuide can complete types, keywords, variables, fields, methods and constructors in different situations.
Consider the following situation: You have typed the following:

A peace of code

The caret is at the end of the Sys. When you press TAB now CodeGuide will automatically complete the Sys to System because this is the only possible completion here:

Sys was completed to System by pressing TAB

Now consider pressing TAB once again. Since there is no "natural" completion of System CodeGuide will show you a list of possible completions. This list contains all types, keywords, fields, methods and variables available at this position.

Completion list

If a "." is typed now CodeGuide will look like this:

Type member list available

The little icon indicates that CodeGuide knows you want to access a static member of class System. If you want to see possible members press TAB:

Type member list

Lets assume you would like to choose the method exit. You can do this by pressing DOWN 3 times and then ENTER. You could also use the TAB completion behavior by typing ex and then pressing TAB.

CodeGuide can show you parameters of a method or constructor directly in the code. Take a look at the following piece of code:

Parameters popup available

The caret is behind the opening parenthesis. The little icon indicates that CodeGuide can show you the parameters of the method exit. To display them press F1 and a popup will appear:

Parameters poup

The method exit has one parameter. Its name is status and it is of type int.

CodeGuide automatically creates a structured view of your source code. It is displayed in the source browser, which can be opened with the corresponding button in the toolbar or by pressing ALT+3:

Source browser

The view shows all classes in the currently selected file and the methods and fields they contain. Inner classes are displayed hierarchically. The source browser is especially good for navigating in your programs. To move the caret in the editor to the next declaration press CTRL+PAGE DOWN. To move it to the previous declaration press CTRL+PAGE UP. In addition CodeGuide draws thin separator lines between the methods in the code.


Prev Next

Copyright © 2000 Omnicore Software
Comments ands questions to support@omnicore.com

All trademarks referenced herein are property of their respective owners