Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Wrong color of variables in tooltips
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pivanof
Junior Member

20 Posts

Posted - Feb 21 2012 :  09:39:55 AM  Show Profile  Reply with Quote
I'm using VS 2010 with VA X 10.6.1862.0. I've set up VA X to use Gray color for variables and turned on coloring in the tooltips. Now color of variables in the code is grey as expected but tooltips in the code window still have all variables in default navy.

Also several times I observed that color of variables everywhere became navy and I had to restart VS to return colors back. But I don't have a reproducer for this.

As a separate question: when and why have default color of variables in VA X changed from Gray to Navy? I was very surprised when I installed VS 2010 and new VA X on top of it.

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 21 2012 :  11:27:07 AM  Show Profile  Reply with Quote
Unfortunately the colouring in the tooltips is a known problem, and actually is a bug in Visual Studio, and is not something we have been able to work around so far:

http://www.wholetomato.com/support/vs2010info.asp

When you talk about colours of variables everywhere going navy, do you mean in the editor, or tooltips? I am assuming the editor. If this was in the editor it almost sounds like something in the current file confused our parser.

The default variable colour changed a little while ago now, in an effort to increase visibility and readability. I am not sure of the exact build off hand, but it has been a few months at least.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 21 2012 :  11:45:08 AM  Show Profile  Reply with Quote
quote:
When you talk about colours of variables everywhere going navy, do you mean in the editor, or tooltips?


By everywhere I mean editor, VA Outline, VA Find Reference Results and tooltips in all of those windows (I think suggestion listboxes and function signatures too, but I'm not sure about those now).

quote:
The default variable colour changed a little while ago now, in an effort to increase visibility and readability.


For me grey on white is readable and visible enough. And at the same time it's less aggressive and softer for eyes compared to navy (just like default color theme of VS 2008 is less aggressive and softer for eyes compared to default theme of VS 2010).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 22 2012 :  12:11:23 AM  Show Profile  Reply with Quote
Have you changed the default colour for classes, preprocessor macros or methods? It would make more sense if all colours were reverting to their defaults, not just variables. But if only variables have been changed from the default, this is the only change you will notice.

Do you have any other extensions installed? Installing or updating another IDE extension might explain the effect you are seeing, since the IDE and its settings have been updated / touched.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 22 2012 :  08:31:38 AM  Show Profile  Reply with Quote
quote:

Have you changed the default colour for classes, preprocessor macros or methods?



No, I haven't changed those. So yes, I would notice the change only in variables color.

quote:

Do you have any other extensions installed?



Besides VA X I have only VS Color Theme Editor installed. And color reset didn't happen during its installation or update (at least manual update, I don't know whether it did automatic update or not). I think it's somehow related to work with VS from Remote Desktop. But I'll have to investigate more to be more conclusive.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 22 2012 :  10:55:46 AM  Show Profile  Reply with Quote
Remote desktop could make sense as a trigger here. If you are running with a specific colour depth or bandwidth on the remote desktop connection this might also be a factor.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 22 2012 :  2:34:23 PM  Show Profile  Reply with Quote
Can I ask you another question about tooltips?
I've just noticed that they are completely different in VS 2008 and VS 2010. In VS 2008 tooltip for variable has its type and initializer, in VS 2010 it's just the type. In VS 2008 tooltip for class member has its declared type and typedef for that type, in VS 2010 it's just declared type (plus full name of class which is of questionable usefulness). And for typedef to some template type VS 2008 shows in tooltip the exact declaration of that type as it's written in sources, but in VS 2010 it shows full signature with all namespaces and default template parameters. And for STL templates the latter becomes completely unreadable very quickly.
Are all these differences intentional? Is there some setting where I can change tooltip format to the one I see in VS 2008?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 22 2012 :  6:48:41 PM  Show Profile  Reply with Quote
For the tooltips, do you have the VA options:

VA Options -> Advanced -> Display -> Display comments from source files when available
VA Options -> Advanced -> Display -> Enable automatic Quick Info ToolTips

turned On or Off in VS2008 and VS2010? If you have different settings in the two IDE's you can expect to get different results.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 23 2012 :  10:10:02 AM  Show Profile  Reply with Quote
Both of these settings are checked in both Studios, "Enable automatic Quick Info ToolTips" is disabled in both Studios too.

So I guess you are saying that all the difference between tooltips in VS 2008 and VS 2010 is done intentionally, right? What's the reason for that?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 23 2012 :  12:12:41 PM  Show Profile  Reply with Quote
Can you post some sample code to help explain what you are seeing here?

Using C++, I have added the following test code to a .cpp file, in both VS2008 and VS2010, on a machine that has never had VA installed:

static void testGeneralCode()
{
	int nTestIntInit = 3;
	if(nTestIntInit > 3) { }
}

When I hover the mouse over "nTestIntInit" in the if statement, both IDE's show me a tooltip that says "int nTestIntInit". The tooltips look different, since VS2010 uses its own coloured tooltips, but the content is the same.

I am using the same .cpp file in both IDE's, to make sure I am testing the same thing in both cases.

I then ran the same test on a test machine with VA 1862 installed, and both IDE's are showing me a tooltip that says "int nTestIntInit = 3"

In both IDE's I have the VA options:

VA Options -> Advanced -> Display -> Display comments from source files when available
VA Options -> Advanced -> Display -> Enable automatic Quick Info ToolTips

turned On.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 23 2012 :  1:22:30 PM  Show Profile  Reply with Quote
I did more testing and it looks like the difference is not in between VS versions, but something in my solutions and/or project files triggers different VA X behavior. So here's the code I tested with:


#include <list>
#include <string>
#include <map>

using namespace std;

static int nTestIntInit = 3;
typedef list<string> TList;
static TList lst;

class C
{
public:
    typedef map<string, TList> TMap;

    void f(void);

    TMap m_Map;
};

static void testGeneralCode()
{
    if(nTestIntInit > 3) {
        nTestIntInit = 2;
    }
    lst.push_back("fdfgdf");
}

void
C::f(void)
{
    TMap::iterator it = m_Map.begin();
    it->second.push_back("sfsdfsdf");
}


When I open empty VS 2010, create new cpp file and paste this code in there all tooltips behave as I expect and as they do in VS 2008. But when I open one of solutions I work with and paste this code into the end of one of source files in there all tooltips are broken. Note that when I open VS 2008 solution which is different sln file and different project files but which includes all the same source files as the solution from VS 2010 (and thus I can see the same pasted code in it) all tooltips behave again as I expect.

Can you suggest what can be wrong here? Do you need full explanation of how tooltips mis-behave?

I probably can even explain where to take all sources I work with and how to generate almost exact copy of the solution I work with (although it won't be easy).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 23 2012 :  2:07:50 PM  Show Profile  Reply with Quote
For this code, which item or items are you showing the tooltip for? There are quite a few symbols to check, and look at.

In VS2008 and VS2010 do you have:

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

turned On or Off?

Since you are working with the same source code files, this should eliminate something as simple as some code further up the cpp file changing the tooltip behaviour. So the libraries, include directories, or versions of standard include files might be a factor.

If you create a new, empty cpp file in VS2010 in your main solution, do you get the expected tooltips? I am wondering if somehow the content of an existing cpp file is a factor in VS2010.

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 23 2012 :  2:39:59 PM  Show Profile  Reply with Quote
When I create new cpp in the same solution and project where I see problems tooltips in it exhibit the same problematic behavior. I had "Get content from default IntelliSense" set differently in VS 2008 and VS 2010. I tried to turn it on and off but it didn't make any difference.

Now what problems I see in the above test code:
- No initializer for nTestIntInit and for it.
- When hovering on lst it shows only "static TList lst", no definition of TList. The same goes for m_Map.
- When hovering on TList it shows "typedef std::list<std::string, std::allocator<std::string> > TList" instead of "typedef list<string> TList". The same problem for it - "TMap::iterator it = ..." should be shown instead of "std::map<std::string, ...".

And now I discovered the creepiest part in all this. I hovered over the symbol to check the wrong behavior which I described above. Then I switched to browser with Alt+Tab without moving mouse pointer. Then after some writing I switched back to VS again with Alt+Tab. Mouse pointer became hovering over the same symbol and VA X showed me correct tooltip. But when I moved mouse pointer just a little without going away from that symbol correct tooltip disappeared and incorrect one appeared instead of that. And such behavior is 100% reproducible if another (non-VS) window covers the symbol with tooltip.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 23 2012 :  9:34:48 PM  Show Profile  Reply with Quote
I think I have found out what is going on. Can you try setting the IDE option:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Auto Quick Info = False

and see what effect this has? This should stop the IDE showing tooltips when you hover the mouse over a symbol, leaving VA free to show its own tooltips.

Does this fix this for you?

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 24 2012 :  10:05:32 AM  Show Profile  Reply with Quote
Thank you. It fixed the problem.

I want to ask last question: is the fact that Find Results window shows everything in default VA X colors related to the same VS bug as tooltip colors?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19178 Posts

Posted - Feb 24 2012 :  11:48:07 AM  Show Profile  Reply with Quote
What sorts of things are you running Find References on? The Find References Results window is using my custom colour for Methods. When I change local variables to a custom colour this is also being used by the Find References Results window.

Are you talking about the syntax highlighting of the code, or the highlighting of the symbol you did the find on?

zen is the art of being at one with the two'ness
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 24 2012 :  12:17:45 PM  Show Profile  Reply with Quote
I wasn't talking about Find References Results (colors in it are alright), I was talking about Find Results which is window appearing after doing Find In Files in VS (and pressing Find All).
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 24 2012 :  5:08:37 PM  Show Profile  Reply with Quote
Not it isn't a bug. We are considering to implement some sort of advanced syntax coloring in the Find Results output window, at some point:

caes=26758
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 24 2012 :  10:45:50 PM  Show Profile  Reply with Quote
Note: there is already syntax coloring in Find Results window. It just happens to be in default VA X colors and it doesn't change automatically when I change VA X settings (like turn on/off advanced syntax coloring) - I have to re-run the search for Find Results window to pick up new color settings.

Returning to the topic of tooltips I see now that conflicts between IDE tooltips and VA X tooltips similar to the one resolved above are all over the place. Is there some general guidelines on resolving them? I've found at least two new conflicts:
- When I pressed Ctrl+Shift+Space inside parenthesis of function call IDE showed its creepy tooltip about function parameters (with completely broken coloring). I had to disable this shortcut to let VA X show its own info about parameters. (This sounds very strange btw: there's no shortcut Ctrl+Shift+Space in the system but VA X catches it and it works; I guess no way to change it though if somebody wants to.)
- Now if I type code, want to create a function call, type open parenthesis and again I see creepy tooltip from IDE about possible function parameters. I had to disable "Parameter information" in Tools -> Options -> Text Editor -> C/C++ -> General -> Statement completion.
I guess "Auto list members" should be disabled there too. Are there some other settings that I should switch to get IDE out of the way and avoid conflicts with VA X?
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 27 2012 :  5:16:12 PM  Show Profile  Reply with Quote
Bummer, yes, it works, I confused it with compilation output's window where it doesn't work, sorry. So are you happy with your find results now?

Edited by - accord on Feb 27 2012 5:16:42 PM
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 27 2012 :  5:26:22 PM  Show Profile  Reply with Quote
quote:
So are you happy with your find results now?


No, they are shown using default VA X colors. But I want them to be shown using my custom colors that I set in VA X configuration.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 28 2012 :  6:25:25 PM  Show Profile  Reply with Quote
I am seeing the same effect here, and put in a bug report for Find Results and tooltips:

case=65009

since I don't see custom advanced colors in tooltips either, do you?
quote:
Are there some other settings that I should switch to get IDE out of the way and avoid conflicts with VA X?

Off the top of my head, no. These "conflicts" mean you're seeing stuff coming from the IDE which is not necessarily a "conflict", in a sense that it is a "bug", more like a preference about what would you like to see: VA or IDE info. Some prefer the IDE. You get what you want by letting VA show what it have.

Edited by - accord on Feb 28 2012 6:44:53 PM
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Feb 29 2012 :  1:36:52 PM  Show Profile  Reply with Quote
quote:
since I don't see custom advanced colors in tooltips either, do you?


If you are talking about tooltips in text editor then no, I don't see custom advanced colors in tooltips there. But earlier in this thread it was said that this is due to the bug in IDE and has nothing to do with . And I don't see any tooltips in Find Results window. I'm totally confused what we are talking about now.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 01 2012 :  5:24:24 PM  Show Profile  Reply with Quote
Sorry for confusing you. I meant find references tooltip. I missed that bit and Feline was right, default tooltip colors is an IDE bug. Unfortunately, Find references uses the default colors for the same reason. So, simply answering your question:
quote:
is the fact that Find Results window shows everything in default VA X colors related to the same VS bug as tooltip colors?

Yes.

Sorry, I messed up a couple of things , but at least ultimately you have the answer. So case=26758 is invalid; cannot be fixed.

Edited by - accord on Mar 01 2012 5:32:41 PM
Go to Top of Page

pivanof
Junior Member

20 Posts

Posted - Mar 02 2012 :  10:52:48 AM  Show Profile  Reply with Quote
quote:
I meant find references tooltip. I missed that bit and Feline was right, default tooltip colors is an IDE bug. Unfortunately, Find references uses the default colors for the same reason.


Either this is typo again or you are wrong. VA Find References Results window colors are my custom colors and tooltips in VA Find References Results are in my custom colors too. Find Results on the other hand uses default VA X colors and has no tooltips. So I hope you meant "Find Results" when said "Find references" in the last sentence above.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 02 2012 :  9:24:37 PM  Show Profile  Reply with Quote
I give up. I will never ever get this right.

I meant quick info tooltips and find results text.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000