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
 implement interface option is not available
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rapaz
New Member

8 Posts

Posted - Mar 22 2012 :  05:58:41 AM  Show Profile  Reply with Quote
Hi all,

I am trying to get VisualAssistX 10.6 with C++ to implement base class virtual functions in a derived class, but the refactor menu of the VA stopped giving me this option. What is see are options to rename and add new member. This happened after I have modified the registery to add VA support for my CUDA source files (.cu and .cuh) file extensions.

Thanks

Vlad

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Mar 22 2012 :  7:10:48 PM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?
What file extension are you seeing this problem in? Are you working in .cu and .cuh files, or .h and .cpp files when this happens?

Since VA is offering some refactoring commands it suggests VA is active and understands the code. Can you please try adding the following test code to a .h file:

class FelineVATestBaseClass
{
	virtual int getHeight() = 0;
	virtual int getWidth() = 0;
	virtual int getDepth() = 0;
};

class FelineVATestChildClass : public FelineVATestBaseClass
{

};

and see if Implement Virtual Methods is offered when triggering refactoring on the child class, or on the base class name where it is used as the base class. This is working for me here with VA 1901.

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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 22 2012 :  8:16:18 PM  Show Profile  Reply with Quote
I did the steps from the following topic and "Implement Virtual Methods..." still works on Feline's code snippet in .cpp, .h, .cu, .cuh files. Have you done these steps as well?

http://docs.wholetomato.com?W328

Edited by - accord on Mar 22 2012 8:18:05 PM
Go to Top of Page

rapaz
New Member

8 Posts

Posted - Mar 26 2012 :  10:40:59 AM  Show Profile  Reply with Quote
Thanks for your reactions!

I am using Visual Studio 10 Premium and VAX 10.6 with C++. I tried the code-snippet of Feline on both cu/cuh and cpp/h file pairs and it doesn work in either case. Refactoring menu does show up but there are only a couple of items there and "Implement Virtual Methods.." is not among them.

@accord: i indeed followed all the steps from the link you've pointed me to and after following these steps visual assist started being active in my cuh and cu files. Which is great, but at the same time the implementing virtuals stopped working :-(
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 26 2012 :  2:07:20 PM  Show Profile  Reply with Quote
Can you please take a screenshot of what you see? I may give us a clue about what's happening. One thing I noticed now that you were talking about the non-right click refactoring menu since you said that it "is not among them". However, I am seeing the same thing here with both right-click and not right-click menu as well:



A little difference like this may be the solution. Anyway, are you trying this in a c++ or in a cuda file?
Go to Top of Page

rapaz
New Member

8 Posts

Posted - Mar 27 2012 :  03:38:21 AM  Show Profile  Reply with Quote
Ok here is what I see when I try to invoke the refactoring menu on the derived class with a right click:



When I try to do the same via the VAX menu all the refactorings are grayed out:



I am trying this both on CUDA and on C++

Thanks!

*edited by feline to make images less wide*

Edited by - feline on Jun 12 2012 3:39:54 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 27 2012 :  1:41:37 PM  Show Profile  Reply with Quote
I've typed in your example snippet from your screenshot but still seeing the same thing. Can you please export your Visual Studio and Visual Assist settings and send them in?

You can use the following form. Please paste the URL of this topic to the description field to match it up.
http://www.wholetomato.com/support/contact.asp

My theory is that your settings may contain something that causes the different behavior. I mean something in addition to the cuda settings.

Another thing: can you please try pasting your example snippet to a newly created C++, win32 test project? I'm wondering whether your project files or settings contain something that "confuses" VA in some way. Strange problem, indeed.

Edited by - accord on Mar 27 2012 1:43:03 PM
Go to Top of Page

rapaz
New Member

8 Posts

Posted - Mar 29 2012 :  03:56:22 AM  Show Profile  Reply with Quote
Thanks for your help. I have filed a support form as you requested. I have also created a new project with a simple example and it works perfectly.... (i can implement virtuals via VA)

Edited by - rapaz on Mar 29 2012 03:56:57 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 29 2012 :  08:29:19 AM  Show Profile  Reply with Quote
I wasn't able to reproduce this problem using your settings which is kind of expected since you also wasn't able in a new project. (However you vssettings seems to be corrupted (cannot be imported) so I only used VA settings)

So it means that there is something in your project settings or source code that may confuse VA.
What happens if you create a new cpp file in your project (where Implement Interface is broken) and paste an example snippet into it. I mean without any include or anything, just to see if the feature works in a virtually empty file.
Go to Top of Page

rapaz
New Member

8 Posts

Posted - Apr 23 2012 :  05:03:27 AM  Show Profile  Reply with Quote
When i create a new cpp project, the same problem exists. Should i try to upload the vssettings again?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 24 2012 :  12:21:42 PM  Show Profile  Reply with Quote
Can you please try uploading both the new cpp project that shows the problem, and your IDE and VA settings as a zip file please, hopefully this will help us get a working copy of your IDE settings that we can import and test.

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

rapaz
New Member

8 Posts

Posted - Apr 25 2012 :  4:04:01 PM  Show Profile  Reply with Quote
sorry my previous post might contradict the earlier one. I meant to say that if i create a new solution, then the VA works perfectly. If i add a new project to the solution that i am working on (and where the problem turned up), then the issue appears. I will send you all the files. Thanks!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 26 2012 :  12:15:07 PM  Show Profile  Reply with Quote
That may indicate that there is a problem with your solution. An interesting test would be to
1. make a copy of your solution
2. delete all projects from your cloned solution
3. add a new project to the now empty solution

a. If it still doesn't work, this problem has something to do with the solution file itself, probably, so you just need to send in an empty solution.
b. If it works it means that there is a "problem" with your project settings, or with the source file(s) in that project.

So in b. case, deleting the files from the projects and adding a clean new project next to the now empty projects would be the way to check if the problem is still happens in the new project.
Hope it makes sense. :)
Guess your are not able to send the solution with the files, this is why I try to isolate the culprit.

But since you don't experience the problem with a clean new project in a clean new solution (using your settings), it means that your VA and VS setting do not play a role here.

Edited by - accord on Apr 26 2012 12:16:56 PM
Go to Top of Page

leoz
New Member

8 Posts

Posted - May 16 2012 :  3:17:23 PM  Show Profile  Reply with Quote
I found this thread because I'm running into the exact same problem as rapaz was. I'm also using VS2010, and also have some custom extensions, but the refactoring no longer works in regular .h files.

Was there any progress made on this?
Go to Top of Page

leoz
New Member

8 Posts

Posted - May 16 2012 :  3:32:01 PM  Show Profile  Reply with Quote
I ran through the steps above - here were my results -
selecting FelineVATestChildClass and using the little arrow that appears:



Right-clicking on the FelineVATestChildClass class shows the following refactoring menu.



I need to implement some interfaces and am a bit sad :).

Using VS2010 10.0.40219.1 SP1Rel
Visual Assist X 10.7.1903 built 2012.04.03

This is in a .h file.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 21 2012 :  10:55:11 AM  Show Profile  Reply with Quote
Can you please try the same test in a new, empty .h file in your main solution, or in a new, default solution please. There is a #endif statement in your screen shot, so it looks like you placed this test code into an existing file. I am wondering if something in this file, further up, is confusing our parser and triggering this problem.

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

leoz
New Member

8 Posts

Posted - Jun 12 2012 :  1:19:02 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Can you please try the same test in a new, empty .h file in your main solution, or in a new, default solution please. There is a #endif statement in your screen shot, so it looks like you placed this test code into an existing file. I am wondering if something in this file, further up, is confusing our parser and triggering this problem.



When I try the same test in a new, empty .h file, everything works properly (I see the "Implement Virtual Methods" option)

Not only that, but when I copy and paste my entire .h file where I'm having the problem to the new file, everything works fine in that new file.

I tried removing and adding this file from the Solution, and rebuilding symbols, but no go.

Also, the test class doesn't work in my more complicated case even at the top of the file. It's almost like there's something broken just for this one file somehow?

Thanks for your response - sorry for the delay in mine, I hadn't realized that I wouldn't be automatically subscribed to the thread by posting to it. Should be subscribed to it now, so will see any responses.

Thanks again.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jun 12 2012 :  2:34:52 PM  Show Profile  Reply with Quote
Can you please turn On the following IDE option:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

and then close and re-load this problem file. Do you see any warnings?

If you use a file manager, and copy this problem file its self, and add this single file to a new, default solution, what happens if you then test in this file? I am wondering if this is a file specific problem, or is somehow connected to the file being part of your main solution.

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

leoz
New Member

8 Posts

Posted - Jun 12 2012 :  3:15:40 PM  Show Profile  Reply with Quote
I turned on the option and closed/reloaded the file. No warnings.

Created new solution, added this file to it, still no worky in the new solution.

I ran the following series of tests, and got some baffling results:
Made a new file called felinetest.H - and then cut/pasted it around my two hard drives - at each new location, I would delete the previous version from the solution (new tiny solution), add the one from the new location and see if "Implement Virtual Methods" is available. Note - the file is not changing at all in these tests
The file worked fine when placed in
f:\\temp
d:\\temp
f:\\dev
f:\\dev\\<dirname>\\<dirname>\\src
However, as soon as I put it in
f:\\dev\\<dirname>\\<dirname>\\src\\<dirname>
it stopped working. The actual location where I had it originally is a few subdirectories down from there.


quote:
Originally posted by feline

Can you please turn On the following IDE option:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

and then close and re-load this problem file. Do you see any warnings?

If you use a file manager, and copy this problem file its self, and add this single file to a new, default solution, what happens if you then test in this file? I am wondering if this is a file specific problem, or is somehow connected to the file being part of your main solution.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jun 12 2012 :  3:43:34 PM  Show Profile  Reply with Quote
Normally the path should never matter, so I am not quite sure why it matters here. Still, at least we now know this is part of the problem.

First, can you please compare the problem path with your VA stable include directories. If your file is in or under a stable include directory this can have effects.

Secondly, are there any extended or unicode characters in any of those directory names?

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

leoz
New Member

8 Posts

Posted - Jun 12 2012 :  3:59:10 PM  Show Profile  Reply with Quote
That was it!

The directory that I was working in was in fact in the "VA Stable Include Directories" list. As soon as I switched my Platform to "Custom" and got rid of that directory, the "Implement Virtual Methods" started working correctly.

That helps work around the problem, but it would be nice if I didn't have to do that :) - the reason why it ended up in the "Stable Includes" is because I have that directory in the "Include Directories" setting for the project, because we commonly start #include paths from that directory - but certainly the .h files there change pretty frequently...

Thanks again for helping me find a workaround :).

No, there are no funny characters in the path.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jun 12 2012 :  4:36:36 PM  Show Profile  Reply with Quote
If the directory is one of the Include Directories then VA should find this directory without difficulty.

Having frequently modified files in your stable include directories is likely to cause some subtle problems, since VA is not expecting these files to change often, and won't be rescanning them all the time.

Strange characters in the path should not matter, but it was worth asking since this was such an odd effect.

I am glad I have been able to help, and that this is now working well for you. This page might help explain a bit more about VA's directory settings:

http://www.wholetomato.com/products/features/directories.asp

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