[Journal - Adding Line Comments in WebEdit.NET]

Adding Line Comments in WebEdit.NET

Saturday, April 2, 2005

A feature long overdue in WebEdit.NET is adding/removing comments on multiple lines. It's been added now, but it requires the proper language configuration (syntax providers and syntax parsers are queried for the appropriate strings). If some a language lacks these helper objects, or isn't configured at all, you can still prefix lines with a textual command. Here's how to do it for DOS batch files, of all things:

code:WebEditApp.EditManager.ActiveRichEditor.AddLineComments("REM ")
code:WebEditApp.EditManager.ActiveRichEditor.RemoveLineComments("REM ")

There are a few other areas I've worked on recently: