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
 Find All References Issues
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

invino4
Senior Member

35 Posts

Posted - May 13 2010 :  4:07:21 PM  Show Profile  Reply with Quote
The following issues have been around for a long time, but I thought I'd comment on them since a new release for 2010 is just coming out.

* Constructors: when finding all references for a constructor the list instead has all uses of the type. It would be a lot more useful if it showed the use of the references when you click find all references while on a constructor for it should show references to only the constructor. When clicking find all references on the type name otherwise then it shows all references to the type in general.

* Virtuals: when finding all references for a virtual it does not walk the hierarchy. When you find all references to an override it would be nice if it also shows calls to the the method through the virtual in the parent (and grandparent, etc) classes since those could also be references to this method.

- Jason.

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - May 14 2010 :  11:26:48 AM  Show Profile  Reply with Quote
Constructors, we are considering doing this at some point in time:

case=1262

As for virtual functions, which IDE and version of VA are you using? VA is searching the class tree for me in VS2005 with VA 1823.

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

invino4
Senior Member

35 Posts

Posted - May 17 2010 :  7:49:07 PM  Show Profile  Reply with Quote
I'm mostly using VAX 1823 on Visual Studio 2008 with C#.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - May 19 2010 :  5:26:58 PM  Show Profile  Reply with Quote
Using VA 1823 with VS2008, and working in C#, I have added the following code to a .cs file:

    abstract class testFindRefBaseClassCS
    {
        public testFindRefBaseClassCS() { }
	    abstract public string displayName();
        abstract public testFindRefBaseClassCS cloneMe();
    }

    class testFindRefChildOneCS : testFindRefBaseClassCS
    {
    	public testFindRefChildOneCS() { }
    	public override string displayName() { return "child class"; }
	    public override testFindRefBaseClassCS cloneMe() { return new testFindRefChildOneCS(); }
    }

    class testFindRefGrandChildOneCS : testFindRefChildOneCS
    {
        public testFindRefGrandChildOneCS() { }
        public override string displayName() { return "grandchild class"; }
        public override testFindRefBaseClassCS cloneMe() { return new testFindRefGrandChildOneCS(); }
    }


and when I run Find References on either function "displayName" or "cloneMe" in any of the three classes, VA always finds 3 functions. So it is scanning up and down the class hierarchy.

Can you please try this code on your system and see what results you get.

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

invino4
Senior Member

35 Posts

Posted - May 19 2010 :  6:45:20 PM  Show Profile  Reply with Quote
Ok, after playing around with your sample I discovered the trick to the bug is that the types have to be generic. If you try this code:


    public abstract class testFindRefBaseClassCS<T>
    {
        public testFindRefBaseClassCS() { }
        protected abstract string displayName();
        protected abstract testFindRefBaseClassCS<T> cloneMe();
    }

    class testFindRefChildOneCS<T> : testFindRefBaseClassCS<T>
    {
        public testFindRefChildOneCS() { }
        protected override string displayName() { return "child class"; }
        protected override testFindRefBaseClassCS<T> cloneMe() { return new testFindRefChildOneCS<T>(); }
    }

    class testFindRefGrandChildOneCS<T> : testFindRefChildOneCS<T>
    {
        public testFindRefGrandChildOneCS() { }
        protected override string displayName() { return "grandchild class"; }
        protected override testFindRefBaseClassCS<T> cloneMe() { return new testFindRefGrandChildOneCS<T>(); }
    }


It doesn't provide the right reference walking.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - May 20 2010 :  4:48:29 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=44537

I had not tested this in template / generic code before, so I was not aware of this limitation.

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