views:

90

answers:

3

Hi,

We have a tool that generates source files, and each generated file has several sections were a user can insert their own code. We would like to be able to mark those sections with a different background color than the automatically generated ones. Is there a way to do this in visual studio?

Thanks!

A: 

i don't think so, why don't you just use noticeable delimiter comments?

cyborg_ar
Hi cyborg_ar,We already do. We'd just like to make the sections more obvious. Idea is that even by just glancing at the code you know which sections are generated and which are not.
Steve the Plant
A: 

This is not possible. Why don't you use partial classes to seprate generated code from user code?

M. Jahedbozorgan
Thanks for the suggestion!While this would work in C#, we also have C++ code that is generated, so using partial classes would only work for one case. Also, we'd prefer to keep the declaration of a class in one spot instead of across two or more files.
Steve the Plant
A: 

Looks like the answer is no.

So I asked a follow up question here, about being able to override Visual Studio's syntax highlighting through a plugin.

Thanks for your answers!

Steve the Plant