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
 Inconsistent snippet/suggestion focus
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shambler
Senior Member

48 Posts

Posted - Oct 11 2013 :  12:08:08 PM  Show Profile  Reply with Quote
In VS2012 I have a predefined snippet that I use a lot, where I get used to typing Key + Key + Tab to auto-select the snippet very quickly when I'm typing.

Normally, when I press Key + Key the suggestions box opens up with the snippet focused/highlighted, which means when I press Tab, it is automatically entered.

Sometimes though, this is not focused, and an actual Tab is entered instead of the snippet - when this happens, it sometimes only occurs in the one document I have open, and not in others; attempting to use the snippet in a different document, sometimes fixes it in the documents where it previously didn't work.

Sometimes though, it just doesn't work at all (even this workaround), and I can't determine a pattern for what causes this.


I'm still in the process of adapting my workflow, to get used to the snippets I've added, but this is creating a hindrance to that which really limits the usefulness of this feature.

It would be good if this bug was fixed, and additionally, if there was a way to ensure the consistency of snippets, so that pressing 'Tab' completes the insertion every time.


In addition, the suggestions for other bits of code are very random in whether or not a suggestion is highlighted - often I will hit 'Tab' mid-flow in my typing, expecting a variable I am entering to be autocompleted, but whatever algorithm is used for determining whether or not such things should be auto-highlighted and tab-completable, doesn't seem to have enough consistency to make it useful.

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 11 2013 :  12:34:13 PM  Show Profile  Reply with Quote
By default VA Suggestions don't have focus when VA thinks you are creating a new variable / symbol name, since we don't actually know what the new name will be. You can change this to make sure suggestions always have focus using the registry, as explained in this FAQ entry:

http://docs.wholetomato.com?W350

Having said that, VA Snippets should always have focus when you type their shortcut, so you can use them exactly as you want, and are normally able to do. At a guess it sounds like there is something in the problem file that is confusing our parser.

Can you please try opening the problem file and showing VA Outline, and also the Alt-M list of methods in the current file.

http://www.wholetomato.com/products/features/vaoutline.asp
http://www.wholetomato.com/products/features/methods.asp

do either of these show any oddities? Missing functions? I am looking for any clues to suggest that our parser is struggling with the file.

Would it be possible to get a copy of your problem file for testing purposes? I realise this is often not possible, but its worth asking on the off chance. If so I could then try and reproduce the problem here. If this is possible, please submit the files via the form:

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

including this thread ID or URL in the description, so we can match it up.

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

Shambler
Senior Member

48 Posts

Posted - Oct 11 2013 :  1:50:07 PM  Show Profile  Reply with Quote
I don't think this is a problem file, because I encountered the problem directly before writing this post, and when I switched back to VS2012 after submitting, the problem was gone (Key + Key + Tab was working again) without any changes having occurred.

I also don't think this was related to methods, because I was using a custom shortcut "@to" within a comment; trying to expand:
"\\\\ @to"

To become
"\\\\ @todo MyName:"

The next time this occurs though, I will try checking the outline; the file is under NDA though, so unfortunately I can't submit it.

I wonder if this may be a problem with intellisense/VAX needing to reprocess the file? (is there a way to force that to occur? if so, I could test that next time this happens, which could give a quick answer)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 12 2013 :  4:43:02 PM  Show Profile  Reply with Quote
Do you have comments being shown in a distinct colour? I am just wondering if your comment block was being coloured as comments.

You are right, since you are working inside a comment most parser concerns just don't apply. VA should know this is a comment, so not care about much else, so this should be very reliable.

Are you able to run a CPU monitor? Process Monitor by Sysinternals is a good option here:

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

I am wondering if these problems are related to CPU usage spikes. If your system is getting bogged down somehow this might cause the problem, but if the machine is this slow it should be generally obvious to you.

To get VA to reparse the current file, just use the menu item:

VAssistX -> Tools -> Reparse Current File

normally you should not have to do this, but it is a good idea and test here. I don't know of any way to force the IDE to reparse the file, but this should not be a factor. VA Snippets work quite happily even if the IDE intellisense parser has been entirely disabled.

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

Shambler
Senior Member

48 Posts

Posted - Oct 12 2013 :  4:50:39 PM  Show Profile  Reply with Quote
Thanks; I will keep an eye out to check all of those things, when this problem occurs again, and report back here.

I can't recall with 100% accuracy offhand, but I do believe the comments were correctly coloured, and that the CPU was not under any real usage - however, best I check again when it happens, rather than assuming.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 12 2013 :  5:33:06 PM  Show Profile  Reply with Quote
In theory you have an ideal situation, very simple and easy to handle. Focus might fail very occasionally, simply due to the system being busy, or some other timing problem, but this should be rare, and simply deleting and retyping the last character for the shortcut should fix the problem.

I am really puzzled by this being file specific. Which programming language are you working in?

Is the problem file very large? I have seen VA slow down in a 23,000 line cpp file.

Do you use a lot of complex macros or templates in the problem file? These have been known to confuse our parser, slowing things down, so either of these might be a factor. If so, you should see some signs, including increased CPU usage on one core, from devenv.exe

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

Shambler
Senior Member

48 Posts

Posted - Oct 12 2013 :  5:40:33 PM  Show Profile  Reply with Quote
Well, this isn't always file-specific; the last time I encountered it (when I made the thread), it happened across the whole IDE on both currently-open and newly-opened files (of varying sizes, some big some small - none really huge), and in the past it had only happened on some files.

So this makes it rather unusual indeed; I'm working in C++, and yes there are a lot of complex macros/templates in the project overall (it is a game engine).

When this problem was occurring though, I did not see any VAX 'parsing' messages in the status bar or anything, so I assume it was not still processing anything.
Go to Top of Page

Shambler
Senior Member

48 Posts

Posted - Oct 13 2013 :  8:40:42 PM  Show Profile  Reply with Quote
I just experienced this again now, and seems to have been occurring while VAX was still parsing the file (was displayed as parsing in status bar); will keep a further eye out for this, to see if this can be confirmed in future instances of this issue.

While parsing, it did not auto-focus the snippet (even though comments seem to be correctly syntax highlighted), and when it stopped parsing, it seemed to work.

Edited by - Shambler on Oct 13 2013 8:41:55 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 14 2013 :  09:54:35 AM  Show Profile  Reply with Quote
Thank you for the update, this makes some sense. While VA is parsing the file, it does not really know what is going on in the file. For a "normal" file parsing should be very quick, making it hard to be typing a snippet shortcut during parsing. It sounds like your file is complex enough to cause parsing to take longer.

Another thought, if you look at:

IDE Tools menu -> Extensions and Updates...

what extensions are listed on you system? On a full install of VS2012 with VA I have the following extensions listed:

Microsoft Web Developer Tools
NuGet Package Manager
Visual Assist X
Visual Studio Extensions for Windows Library for JavaScript

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

Shambler
Senior Member

48 Posts

Posted - Oct 14 2013 :  12:53:04 PM  Show Profile  Reply with Quote
That makes sense then - this is a very large and complicated project, making heavy use of templates and macros, with a very large number of interconnected classes.

The extensions I have are:
NuGet Package Manager
Visual Assist X
Visual Studio Extensions for Windows Library for Javascript

There is also an additional toolbar extension, which is part of the project I am working with, but which shouldn't interfere with VAX.

In any case, I think it's safe to assume this is resolved for now, unless I come across this issue in different circumstances :)

Thanks for the help!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 15 2013 :  1:26:53 PM  Show Profile  Reply with Quote
Hopefully this won't cause you to many problems, and it seems likely this is down to the slow parsing.

If you notice any macros or templates that are causing VA particular problems we may be able to do something about this. Its possible to hide problem macros from VA's parser, or tell VA to use a simpler and faster form of the macro instead. Just let me know if this sounds helpful, and I will see what I can do.

This is often done when you have code that VA struggles to understand and support properly.

zen is the art of being at one with the two'ness
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