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
 Feature Requests
 New "Add similar member" functionality
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jul 03 2006 :  02:48:49 AM  Show Profile  Reply with Quote
Sample:

// header
class AAA {
public:
   void Func();
};


// cpp file
void AAA::Func() {
   std::string a;
   int         b;

   NewFunc( a, b );
}

When I hover over "NewFunc", then from "down arrow menu" I can call "Add similar member", which will try add new member with signature "void NewFunc( std::string a, int b )" in class "AAA".

support
Whole Tomato Software

5566 Posts

Posted - Jul 03 2006 :  6:43:57 PM  Show Profile  Reply with Quote
We believe this problem occurs only in VC6 when the header does not end with a blank line.

Can you confirm this is the case for you?

case=1531
Go to Top of Page

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jul 04 2006 :  05:15:01 AM  Show Profile  Reply with Quote
Heh... It was a suggestion... Anyway, refactor menu for "NewFunc" for me shows "No refactoring available for symbol", alse NewFunc is underlined with red (it's correct bcs. no declaration for the function is present).

VAX 1526. VS2005
Go to Top of Page

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jul 04 2006 :  05:16:45 AM  Show Profile  Reply with Quote
Also, "NewFunc" is never defined for any class or global
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jul 04 2006 :  6:15:08 PM  Show Profile  Reply with Quote
the problem here is that VA does not know which class you want to add the function to. i see what you are getting at here, but at the same time i can see this opening up a list of related requests, e.g.

CFoo bar;
bar.new_member_function();

people then wanting to add "new_member_function()" to CFoo, picking up its parameters at the same time.

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

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jul 05 2006 :  12:53:28 AM  Show Profile  Reply with Quote
If "new_member_function" is not declared in CFoo, then in CFoo, else in current class context.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jul 06 2006 :  5:29:55 PM  Show Profile  Reply with Quote
i shall ask support about this one. personally i rather like the idea, but i am slightly concerned about the scope of the idea. just how much may we be letting ourselves in for here?

i can see a range of possible problem cases, to do with pointers to base classes, etc.

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

Admin
Whole Tomato Software

USA
74 Posts

Posted - Jul 06 2006 :  7:44:05 PM  Show Profile  Reply with Quote
Interesting idea that we'll put on the list to consider.
Go to Top of Page

AdyR
Ketchup Master

United Kingdom
75 Posts

Posted - Jul 17 2006 :  07:57:28 AM  Show Profile  Reply with Quote
I would like to add my vote to this.
E.g. if I type just the method name, then add it to the class of the current method:
void aClass::someMethod()
{
x = newFunc(a, b); //Add this to aClass
}

but if I qualify it with another class by pointer or direct reference then add it to that class:
x = someClass.newFunc(a, b); //Add this to someClass

Ady
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 08 2006 :  01:19:11 AM  Show Profile  Reply with Quote
Case 1531 is fixed in build 1531.

How about that?
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