Share via


Finding Errors with Dynamic Syntax Checking

   

Visual J++ also provides dynamic syntax checking to assist you when you're writing code within the Text editor. In addition to the information Statement Completion provides, you receive visual clues in the form of red squiggly lines and error tips as you build your program's statements.

As you begin typing within a .java file, red squiggly lines appear under code elements, such as class names, member names, and symbols. When you see a red squiggly line, IntelliSense is telling you your code, as it is currently written, has syntactic errors. As you continue typing, the red squiggly lines may disappear as you finish the statement — depending upon the correctness of the completed statement.

For each syntax error marked with a red squiggly line, a task related to the syntax error will appear in the . This provides a list of items that you'll need to correct before you compile your program.

To get error tips and error help from a red squiggly line

  1. Rest the cursor over the red squiggly line.

    IntelliSense displays an Error Tip that best suits the context of your source code. On occasion, the tip will simply be "Syntax Error."

Tip   If you do not see a red squiggly line under obvious syntax errors, make sure you've enabled the options that support dynamic syntax checking.

  1. While resting the cursor over a red squiggly line, click the right mouse button to access the shortcut menu.

  2. From the shortcut menu, select Error Help to get online help for the error identified by the red squiggly line.

See Creating Statements with Word Completion for an example that demonstrates the use of red squiggly lines.