Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1548 / 1549: Create Implementation method name

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
dgehri Posted - Mar 20 2007 : 10:52:12 AM
I'm using VA 1549 (and upgraded from 1548, in the hope of resolving the issue). Given a header file similiar to this one:


class X {
  public:
    void foo(int arg1, arg2);
    void bar();
};


When using hovering over "foo" and selecting "Create Implementation", the correct X::foo is generated in the source file. When I proceed and do the same for bar(), the result is:


void X::foo(int arg1, arg2)
{
}


So I get a second implementation for "foo", even though I clicked on the arrow next to "bar". This happens randomly, sometimes it works as expected, and half of the time it doesn't. I had no such problem before 1548.

Another problem, which makes me loose a lot of time, is that the VA contect menu arrow doesn't always appear. In the example above, I immediately get the triangle for "foo", but I have to try about 5 - 10 times to get it for "bar". Often, I only get the VA menu after hovering over a few other symbols.

Another problem is that for functions declared as "const", the "const" keyword isn't automatically added when creating the implementation.

- dgehri


VA_X.dll file version 10.3.1549.0  built 2007.03.16
Licensed to:
  VA X: ********@******.com (1-user license) Support ends 2007.07.03
VAOpsWin.dll version 1.3.4.8
VATE.dll version 1.0.6.2
DevEnv.exe version 8.0.50727.762
msenv.dll version 8.0.50727.762
Font: Lucida Sans Typewriter 11(Pixels)
Comctl32.dll version 6.0.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Custom
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;

Other Includes:
C:\\Daniel\\linkcad\\3rd-party\\FOX\\include;


9   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 22 2007 : 10:16:13 AM
Got it, as you say, including the boost::bind header file is the key factor here. Once I did this the problem was easy to reproduce.

That is very strange.

case=5623
dgehri Posted - Mar 21 2007 : 4:25:33 PM
The tooltip is referring to the following line in bind_template.hpp:


    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9)
    {
        list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
    }


I guess you have to create a project, which includes boost::bind (and maybe even uses it). Try


#include <boost/bind.hpp>

feline Posted - Mar 21 2007 : 4:21:32 PM
I am a little confused. I am not seeing any reference to boost::bind in this code, or the screen shot.

Using this code here I am getting a tooltip saying "double scaling_" at this point, but I just placed the code into one of my test headers.
dgehri Posted - Mar 21 2007 : 2:22:44 PM
It just happened again, and I was quick enough to take a screen shot:



For your information, "scaling_" is a simple double:


namespace lc {
namespace cad {

class Mapping
{
public:
    // Constructor
    Mapping();

// ... snip! ...

private:
    geom::Point2i64     viewportOrigin_;    // viewport origin in world coordinates
    Point               clientOrigin_;      // client origin (top left) in viewport coordinates
    double              scaling_;           // world to client scaling factor
    dist                clientWidth_;       // width of client window
    dist                clientHeight_;      // height of client window
};

} // namespace cad
} // namespace lc


So first: my apologies! Now that I've seen the tool tip, I realize it's not my templated code that is causing the problem. Rather, it's Boost's "bind_template.hpp": http://www.boost.org/boost/bind/bind_template.hpp.

I'm using boost::bind in a few places in my code. So my previous information was misleading -- sorry! But the underlying problem remains.

- Togo
feline Posted - Mar 21 2007 : 1:11:31 PM
I am reluctant to ask the developers to dig into this without a better idea of what is happening.

I am making the assumption that this header file is fairly static, and that the problems you are seeing occur when you are using these classes. Is this a reasonable statement?

Do you ever use VAView? As an experiment I hovered the mouse over the outermost namespace, so that VAView would show this in the HCB (the bottom section). After expanding a couple of nodes I saw this:



Looking at the matching code, this tooltip, in this context, makes sense. It could be we need to focus on the code you are typing in the cpp file, and what VA thinks is going on, if you are seeing this sort of tooltip in a cpp file. Does this make sense?
dgehri Posted - Mar 21 2007 : 12:07:52 PM
quote:
Originally posted by feline

The formatting of multiple lines of parameters with Create Implementation is a known issue, but it is part of a bigger problem, which is how VA's re-factoring handles this type of formatting:

case=1631

I have the code, but I am not immediately seeing any problems with tool tips. Can you tell me what you are doing, and I can try the same thing here, and hopefully I will be able to reproduce the problems.



The problem is that all those problems are intermittent, and I can't reproduce them in a single test case. Regarding that code, every once in a while, it shows up in parameter list suggestions. In the suggestion tool tip, I see something like this:
R (CLASS::*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)


This seems to happen whenever VA.X doesn't really identify the function and starts guessing.

Maybe one of your developers can take a closer look at how VA.X is parsing that code and check if there isn't a bug in the parser code ?

- Togo
feline Posted - Mar 21 2007 : 11:57:27 AM
The formatting of multiple lines of parameters with Create Implementation is a known issue, but it is part of a bigger problem, which is how VA's refactoring handles this type of formatting:

case=1631

I have the code, but I am not immediately seeing any problems with tooltips. Can you tell me what you are doing, and I can try the same thing here, and hopefully I will be able to reproduce the problems.
dgehri Posted - Mar 21 2007 : 04:00:30 AM
quote:
Originally posted by feline

The delay in seeing the refactoring context menu icon makes a degree of sense. Can you try opening the VAssistX -> Refactoring IDE menu, or binding a keyboard shortcut to VAssistX.RefactorContextMenu and see if this makes any difference?


Ok, I'll try this and report back.

quote:
For the const function, do you mean:

class CFoo
{
	const int getWidth() const;
};


using VS2005 and VA 1549 Create Implementation works correctly on this type of const function for me.


You are right. That's new then. But there are still formatting problems:

    void                doSomething(int a,
                                    int b,
                                    int c) const;

becomes:

void Text::doSomething(int a,       int b,       int c) const
{

}


Would it be possible to remove the spaces between the arguments ?

quote:
I am wondering if there is a connection between these problems. If VA is confused by something, or having problems with your files for some reason this might explain it.


I'm pretty sure VA is confused. But a bug must have been introduced lately, since it never implemented the wrong function with earlier versions.

But regarding VA's confusion (not necessarily related to the above problem): Below is heavily templated source code file, which I'm using in one of my projects. Contents of this file shows up in VA.X' tool tips and suggestions (parameters lists!) in completely unrelated places. Somehow, this code definitely confuses VA.X.

- Daniel


<...snip...>
feline Posted - Mar 20 2007 : 6:54:38 PM
The delay in seeing the refactoring context menu icon makes a degree of sense. Can you try opening the VAssistX -> Refactoring IDE menu, or binding a keyboard shortcut to VAssistX.RefactorContextMenu and see if this makes any difference?

It is as if VA is still parsing the recent changes, so it has not yet caught up with things.

For the const function, do you mean:

class CFoo
{
	const int getWidth() const;
};


using VS2005 and VA 1549 Create Implementation works correctly on this type of const function for me.

I am wondering if there is a connection between these problems. If VA is confused by something, or having problems with your files for some reason this might explain it.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000