Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Macros & Highlighting

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Krakken Posted - Jan 16 2007 : 8:58:33 PM
Even though it's a small request, would it be possible to add an option to turn off syntax colouring for macro parameters. I use macros quite often and due to the way I use them, it can make my code look messy with random colours appearing in them. I can give you an example:


#define BIND_SCRIPT_COMMAND(FUNCTION) \ScriptSystem::BindCommand(#FUNCTION, ScriptCallback_##FUNCTION)

BIND_SCRIPT_COMMAND(DoSomething);


The above defines a shortcut that would expand to:


ScriptSystem::BindCommand("DoSomething", ScriptCallback_DoSomething)


The problem is that as "DoSomething" is not actually a command or defined anywhere else, it comes up as white. In other situations where there is a DoSomething() function around somewhere, it will highlight the function in whatever colour is specified.

I'd just really like to be able to disable it so it just stays the default text colour within the macro params.
6   L A T E S T    R E P L I E S    (Newest First)
Krakken Posted - Jan 21 2007 : 10:05:03 PM
That's true and that should work. Thanks.
feline Posted - Jan 19 2007 : 07:17:56 AM
Initially I am reluctant to put in a request for this, since it is adding another option, another thing that can go wrong, and so far it only seems to benefit a very small number of people.

If you are using complex macro's to generate a lot of code have you considered getting the macro's to generate some form of:

#if VA_COLOUR_TRIGGER
#define DoSomething
#endif


block?
Krakken Posted - Jan 18 2007 : 7:33:47 PM
I see what you mean now but that is something I think I can live with and why it would be nice if it was just an option available. Obviously it's not that important - just something I'd prefer over having to manually type out blank defines for every function I have. Maybe even if the option continued to colour numbers, text and variables but functions within a macro come out as the default text colour.
feline Posted - Jan 18 2007 : 10:01:40 AM
Assume I have the macro max(a, b) which takes two int's and returns the biggest. If I now have the code:

static int getBiggest(int foo1, int foo2)
{
    return max(foo1, foo2);
}


I know, not a brilliant function, but in this case people are going to want both references to "foo1" highlighted correctly. When the function becomes longer this becomes more important.

The work around I suggested, since the code is disabled the IDE ignores it, but VA will still scan this code, and will colour "DoSomething" as a #define, since it is one. This way you should get consistent colouring of "DoSomething".
Krakken Posted - Jan 17 2007 : 6:26:45 PM
Sorry I don't think I quite follow. :p
feline Posted - Jan 17 2007 : 07:26:39 AM
The problem with this is that you remove colouring from all macro parameters. So what about macro's that are applied to member variables, local variables, functions, etc?

Have you considered doing something like this:

#if 0
#define DoSomething;
#endif


Which tells VA how to colour DoSomething.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000