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
 Option to disable the refactoring functionality?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lguilhou
New Member

7 Posts

Posted - Feb 12 2008 :  5:24:37 PM  Show Profile  Reply with Quote
Hi,

I was wondering if there would be a way (current or future) to disable all refactoring functionalities in VAssist?

Basically, I've got a little problem between VAssist and ReSharper.
I've been using VAssist for quite a few years for its Intellisense functionalities (which are far better than ReSharper's), and ReSharper for quite a few years too (but a little less) for its refactoring functionalities (which are more complete than VAssist's, at least in a C#-only environment, and besides, my current company has licenses for ReSharper only).

I disabled the refactoring arrow, which eliminates most of the cohabitation issues, but one remains: the namespace importation suggestion. When the cursor is over a class that needs the addition of a using directive, ReSharper and VAssist are fighting over who will be chosen first. That makes it very difficult to actually use either of them.

Hence the question: can VAssist's namespace suggestion (or the whole refactoring package) be disabled somewhere, and if not, is there a chance to be able to do this in the (not too distant) future? :)


Thanks,

Lionel

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 13 2008 :  08:21:12 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

I have added the line:

SqlConnection foo;

to a cs file that is missing the required using statement, and I am not seeing anything from VA when I hover the mouse over the type. There is a VA feature where you can see a listbox offering the using statement as you type the class name, but that appears as you are actually typing, not when you hover the mouse.

What you are asking for is quite reasonable, but I don't think VA is causing this problem, or I am confused over the problem you are seeing.

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

lguilhou
New Member

7 Posts

Posted - Feb 13 2008 :  6:11:34 PM  Show Profile  Reply with Quote
My bad, I said 'cursor' when I meant 'caret' :)
It does not happen when hovering the mouse over a type, but when the caret is on it.

The appearance of the VAssist suggestion listbox (the one you're speaking of) is repeatable rather easily (at least in my case) but the behavior can be somewhat random.

I'm currently using Visual Studio 2005 Standard Edition, VAssist 10.4.1626.0 and ReSharper 3.1 Full Edition. Those are the only two plugins with any 'real' impact on the editor (TestDriven.NET has virtually no chance of being related to any of this :)
The OS is Windows XP x64.

One short bit of code with which I can reproduce it at the moment:
namespace Test
{
	class Class1
	{
		private List<string> list = new List<string>();
	}
}


When placing the caret on either of the 'List' types, I get one of the following behaviors when using ReSharper's QuickFix shortcut key or if I click on the red lightbulb:

- ReSharper's suggestion listbox appears, I choose the namespace, the list disappears, the using is inserted, nothing else happens. No problem there.

- ReSharper's suggestion listbox appears, I choose the namespace, the list disappears, the using is inserted, then VAssist displays its own suggestion listbox. Nothing is selected in the list and it disappears as soon as I hit a new key. Not a big problem.

- ReSharper's suggestion listbox appears, I choose the namespace, the list disappears, the using is inserted, then VAssist displays its own suggestion listbox with the first item selected. In this case, hitting a completion key triggers VA's using insertion which sometimes simply 'redoes' what ReSharper did before and sometimes does... something that cancels what was done (I'm not very clear myself on exactly what happens, except that the type identifier goes back to being red :)

- ReSharper's suggestion listbox tries to appear but is quickly removed while VAssist's shows itself. Not very practical when the intended QuickFix was actually not an insertion of using (Create Class for example)

- in the previous case, sometimes the caret simply disappears and I need to switch to another window to get it back.

Even without involving ReSharper, VA's suggestion listbox sometimes appears simply after clicking on a type, which sometimes triggers the disappearing caret behavior.

(there are a lot of sometimes, I know :)

For instance, with the code above, if I make any modification in the code (adding a space somewhere) then click on 'List' (or go to it by keyboard), VA's listbox appears.

If I use ReSharper's QuickFix to create a new class instead of adding a using, I then hit Enter to choose the 'class' keyword, then the caret is placed at the end of the class name and once again, VA's listbox appears, though there's no reason to suggest anything anymore.

Those are the various cases I've been able to reproduce with this small bit of code. All of this started happening after the installation of the first version of VAssist with this listbox (can't remember which one exactly though).

It does look (to me) like VA is the one doing things when it shouldn't, but who knows what could be happening under the hood :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 14 2008 :  10:44:12 AM  Show Profile  Reply with Quote
What VA listbox are you seeing? The listbox that suggests the using statement, or some other listbox? Or a mixture?

This sounds like some form of interaction problem between ReSharper and VA. Certainly I have never seen this listbox appear when simply moving the caret around a file, or clicking into a type.

If you upgrade to the latest ReSharper nightly build do you still see the same problem? I am wondering, since doing this helped with a problem in VS2008, reported in this thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7025


It looks like an option to turn off refactoring suggestions, including these using namespace suggestions, has been added internally and should turn up in the next few builds:

case=10428

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

lguilhou
New Member

7 Posts

Posted - Feb 14 2008 :  5:12:10 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

What VA listbox are you seeing? The listbox that suggests the using statement, or some other listbox? Or a mixture?

The first one. Well at least it looks like the first one.
With the code above, if I add a space in 'private' then move (with the keyboard) between 'L' and 'i', the listbox contains 2 lines. The first one is a class suggestion for 'List' with a tooltip indicating 'class NHibernate.Mapping.List' (the funny thing being that I don't have a reference to NHibernate in this project :). Selecting it doesn't do anything. The second one is 'using NHibernate.Mapping;'. Selecting it adds the using directive.
If I move to the next letter (still with the keyboard), the listbox is reduced to the class suggestion. If I move again to the next letter, the list disappears.

I've tried clearing the history, cache and temporary files via the Performance options menu, but it doesn't help.

Also I have to highlight the fact that the suggestion listbox never suggests System.Collections.Generic.List<T> :)

quote:
This sounds like some form of interaction problem between ReSharper and VA. Certainly I have never seen this listbox appear when simply moving the caret around a file, or clicking into a type.
Well it happens after having changed something in the code (even only a space), so maybe when the cursor is then placed over an undefined type, it thinks I was typing it. But it's clearly very strange.

quote:
If you upgrade to the latest ReSharper nightly build do you still see the same problem? I am wondering, since doing this helped with a problem in VS2008, reported in this thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7025
There are no nightly builds available until the start of the EAP for ReSharper 4, so I can't do that for the moment. It looks like the first RS4 nightlies will be available starting this week-end though, so I'll try as soon as I can get my hands on one :)

Meanwhile, I've tried uninstalling RS3.1 and used the same code as before to reproduce the problem with VAssist only. And... I can still reproduce it every time.
I just have to make any change anywhere in the file then click on 'List' and the suggestion listbox appears. Even without the mouse, changing something then moving the caret to the symbol triggers the listbox, but only if it's done rather quickly. If I wait a few seconds before moving the caret, nothing happens.

So it doesn't look like ReSharper has any part in this particular problem (though the topic you indicated above makes me fear the worst for the day I'll be switching to VS2008 :)


quote:
It looks like an option to turn off refactoring suggestions, including these using namespace suggestions, has been added internally and should turn up in the next few builds:

case=10428
Thanks a lot, that will 'fix' the problem just fine in my case :)
The remaining question will be about what's causing the suggestion listbox to pop up when it shouldn't. Though if it doesn't affect many people and since I won't see it anymore if it can be disabled, this may clearly not be a priority :)
Go to Top of Page

willdean
Tomato Guru

134 Posts

Posted - Feb 14 2008 :  5:48:22 PM  Show Profile  Reply with Quote

Resharper 3.11 nightlies are available from

http://www.jetbrains.net/confluence/display/ReSharper/Nightly+Builds

I am running the latest, but one in early January fixed a R# performance problem which could be triggered by (among other things) the presence of VisualAssist.

I actually have VA set to disable itself for .CS files now, so I don't have anything helpful to say about subtle intellisense problems.
Go to Top of Page

lguilhou
New Member

7 Posts

Posted - Feb 14 2008 :  6:24:03 PM  Show Profile  Reply with Quote
Ah, they just removed the link, silly me :)
Thanks, I've installed the latest nightly. No problem on the ReSharper side for the moment, but the using suggestion popup problem with VA is still there (that would have been a surprise since it happens even without RS)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 15 2008 :  09:22:07 AM  Show Profile  Reply with Quote
quote:
Originally posted by lguilhou
With the code above, if I add a space in 'private' then move (with the keyboard) between 'L' and 'i', the listbox contains 2 lines.


I am not seeing any such listbox. However I am not sure if I am doing the same thing as you or not. I have tried adding this code to a cs file on two different machines, both using VS2005 and VA 1626.

namespace Test
{
    class Class1
    {
        priva|te |List<string> list = new List<string>();
    }
}

I placed the caret at the first marked location, added a single space, and then used the right arrow key to move the caret into "List". No listbox appeared. I used undo, then did the same test at the second marked location. Again no listbox.

Am I doing the right test?

On a winXP machine I then created a new, default C# Windows application and did the same test in the "Form1.cs" file. Again no listbox.

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

lguilhou
New Member

7 Posts

Posted - Feb 15 2008 :  11:29:57 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline
I placed the caret at the first marked location, added a single space, and then used the right arrow key to move the caret into "List". No listbox appeared. I used undo, then did the same test at the second marked location. Again no listbox.

Am I doing the right test?
Yup, same thing.

quote:
On a winXP machine I then created a new, default C# Windows application and did the same test in the "Form1.cs" file. Again no listbox.
I just tried this (new C# Win Application) and typed
private List<string> list = new List<string>();

VAssist displayed the suggestion listbox while typing, again to suggest the List class in NHibernate (the NHibernate library is not referenced in the project, nor is it installed in the GAC. I don't know how VAssist found it). After typing the line, I moved the caret back to the first 'List' occurrence, and again, I got the suggestion listbox, same as before.

I tried removing all Proj* directories in Doc&Settings, and went in the Options dialog to re-clear the cache and rebuild all symbols. I restarted VS, opened the same Winforms project and tried again.

This time, no more listbox when typing something somewhere and placing the caret on the 'List' identifier. Looks like it was better, but for one thing. Now when I'm typing 'private', VA suggests 'partial'. When I'm typing 'List', it suggests 'Label'. When I'm typing 'string', it suggests 'sbyte'. And if I'm typing fast enough, the suggestion replaces what I just typed.

Needless to say, I have absolutely /no/ idea as to what's happening here :)

Edited by - lguilhou on Feb 15 2008 11:31:42 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 15 2008 :  8:35:36 PM  Show Profile  Reply with Quote
As you probably expected, I am not seeing any of these problems here.

I am guessing this is related to this unexpected "class NHibernate.Mapping.List" entry you are seeing. Do you know where this class is coming from? I suspect it is somewhere that VA is re-scanning when it is asked to rebuild the symbol database.

But this does not explain why you are seeing all these strange effects.

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

lguilhou
New Member

7 Posts

Posted - Feb 20 2008 :  01:18:52 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline
I am guessing this is related to this unexpected "class NHibernate.Mapping.List" entry you are seeing. Do you know where this class is coming from?
I'm using NHibernate in other projects on the same computer. So VAssist can often see it, but not in the mini-project I was using for the tests. It should not be installed in the GAC, though maybe once upon a time I put an old version of it there. I'll have to check on it.

Besides, the bogus suggestion for this class is pretty much a special case. At least I didn't notice it before. Though that may be because I'm usually busy escaping out of the suggestion popup when I'm trying to use a ReSharper quick fix and VA doesn't want me to (which was the initial problem :)

quote:
I suspect it is somewhere that VA is re-scanning when it is asked to rebuild the symbol database.
Does it scan only the current project or also recently opened solutions? All my projects/solutions are under the same /Projects directory, but unless VA also scans adjacent directories, it shouldn't be able to find NHibernate (the test project is the only one I opened after telling it to rebuild its database).

quote:
But this does not explain why you are seeing all these strange effects.
Yup. And I have no idea how to find more details that could help shed some light on this. I guess I'll just live with it until a build allowing to disable the refactorings, or at least this particular suggestion listbox :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 20 2008 :  08:00:10 AM  Show Profile  Reply with Quote
VA should not be re-scanning the other projects. I am not sure what is happening here, to be honest.

Waiting for the next build, and the option to disable these refactoring listboxes is probably the best answer. Hopefully it will fix these problems.

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

lguilhou
New Member

7 Posts

Posted - Feb 20 2008 :  10:54:04 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

VA should not be re-scanning the other projects. I am not sure what is happening here, to be honest.

Waiting for the next build, and the option to disable these refactoring listboxes is probably the best answer. Hopefully it will fix these problems.

No problem, I'll wait :)

Anyway, thanks for having spent time on this. I'll keep looking for clues about what's happening if I can find any. Other than that, next episode next build(s) :)


Regards,

Lionel
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 10 2008 :  12:43:38 AM  Show Profile  Reply with Quote
case=10428 is fixed in build 1632
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