Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Edit User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.4 Working with Comments

6.4.1 Making Parser Tags Case-Insensitive

If you open up the language configuration .ini file, the editor section may look like this:

If you want the editor not to be case sensitive, change the value of the MatchCase flag to 0.

6.4.2 Enabling Line Continuation

One feature of Visual Basic is that you can type a comment that spans multiple lines, if you use the underscore " _" at the end of each line. For example:

In the above example, all three lines would be highlighted in green, the same as a single line comment.

Because Objective Edit has no built-in way to specify line continuation for syntax coloring, ordinarily only the first line "rem this is a comment _" would be green and the rest would look like regular text. However, you can customize your project to produce Visual Basic syntax coloring. To handle line continuation so that a remark that covers two lines would all be properly colored as a comment, modify SECEdit::GetLineColor() and check whether the previous line has a line continuation symbol (_) and is a single line comment. Take a look at this pseudocode:

This means we will need a recursive helper function to determine if the current line is continued from a single line comment.

You can derive a new class from SECEdit. In the following sample implementation, GetLineColor() is derived from SECEdit::GetLineColor() and IsComment() is the recursive helper function.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.