T O P I C R E V I E W |
pivanof |
Posted - Feb 21 2012 : 09:39:55 AM 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. |
25 L A T E S T R E P L I E S (Newest First) |
accord |
Posted - Mar 02 2012 : 9:24:37 PM I give up. I will never ever get this right.
I meant quick info tooltips and find results text. |
pivanof |
Posted - Mar 02 2012 : 10:52:48 AM 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. |
accord |
Posted - Mar 01 2012 : 5:24:24 PM 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. |
pivanof |
Posted - Feb 29 2012 : 1:36:52 PM 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. |
accord |
Posted - Feb 28 2012 : 6:25:25 PM 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. |
pivanof |
Posted - Feb 27 2012 : 5:26:22 PM 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. |
accord |
Posted - Feb 27 2012 : 5:16:12 PM 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? |
pivanof |
Posted - Feb 24 2012 : 10:45:50 PM 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? |
accord |
Posted - Feb 24 2012 : 5:08:37 PM 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 |
pivanof |
Posted - Feb 24 2012 : 12:17:45 PM 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). |
feline |
Posted - Feb 24 2012 : 11:48:07 AM 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? |
pivanof |
Posted - Feb 24 2012 : 10:05:32 AM 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? |
feline |
Posted - Feb 23 2012 : 9:34:48 PM 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? |
pivanof |
Posted - Feb 23 2012 : 2:39:59 PM 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. |
feline |
Posted - Feb 23 2012 : 2:07:50 PM 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. |
pivanof |
Posted - Feb 23 2012 : 1:22:30 PM 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). |
feline |
Posted - Feb 23 2012 : 12:12:41 PM 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. |
pivanof |
Posted - Feb 23 2012 : 10:10:02 AM 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? |
feline |
Posted - Feb 22 2012 : 6:48:41 PM 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. |
pivanof |
Posted - Feb 22 2012 : 2:34:23 PM 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? |
feline |
Posted - Feb 22 2012 : 10:55:46 AM 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. |
pivanof |
Posted - Feb 22 2012 : 08:31:38 AM 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. |
feline |
Posted - Feb 22 2012 : 12:11:23 AM 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. |
pivanof |
Posted - Feb 21 2012 : 11:45:08 AM 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). |
feline |
Posted - Feb 21 2012 : 11:27:07 AM 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. |