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
 [Bug Report] VA Snippets macro "$PROJECT_NAME$"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BeigeAlert
Junior Member

USA
16 Posts

Posted - Jul 21 2018 :  3:14:12 PM  Show Profile  Reply with Quote
Hi,

I have a macro setup to "///" that'll automatically generate the preamble for the top of my files, and I noticed today that the "$PROJECT_NAME$" macro results in nothing until I close and re-open the solution after creating a new class. The $SOLUTION_NAME$ macro works fine though.

Repro Steps:
- Create a new class using the Add -> Class... option in the Solution Explorer.
- (not sure if this matters or not, but I add a "src/" previx to the header and source file names so that it doesn't just dump them into the project root).
- Attempt to use a VA Snippet that uses the $PROJECT_NAME$ macro in either of the 2 new files.
- Notice the project name is left blank.
- Save everything, close the solution, then open the solution again.
- Delete the snippet and try again. Now it works.

If I don't survive, tell my wife "Hello".

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jul 23 2018 :  05:19:23 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

So far I cannot reproduce this problem here, I am testing using VS2015 and VA 2283.

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

BeigeAlert
Junior Member

USA
16 Posts

Posted - Jul 24 2018 :  11:43:01 AM  Show Profile  Reply with Quote
I am using VS2017 and the latest visual assist (downloaded and tested moments before making the OP... not sure what number that is).

If I don't survive, tell my wife "Hello".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jul 24 2018 :  1:36:23 PM  Show Profile  Reply with Quote
I have tried this in VS2017, and still no sign of the problem here.

Can you please open VS2017, then make a new, default C++ MFC project in the IDE, and see if you can reproduce the problem in this solution? I am wondering if there is something about your main solution that is a factor, as if VA is not picking up the change to the project structure correctly.

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

BeigeAlert
Junior Member

USA
16 Posts

Posted - Jul 27 2018 :  1:23:07 PM  Show Profile  Reply with Quote
I just noticed when using VA's "Find References" function on a recently created class that it was only displaying results from the header and source file of that class. Then I enabled "Display references from all projects", and suddenly the results I was expecting popped up, and I notice that the header and source files don't have any project associated with them in the search box (eg all other files are in an expandable group for their respective project).

I will try your steps now to see if it happens with a fresh project.

EDIT: Okay even on a blank project, it still exhibits the same behavior (project name is blank until I reopen solution).

The only other plugins I have for VS is the "QT VS Tools" plugin.

If I don't survive, tell my wife "Hello".

Edited by - BeigeAlert on Jul 27 2018 1:29:15 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jul 27 2018 :  2:30:50 PM  Show Profile  Reply with Quote
Can you please look in the dialog:

IDE Help menu -> About Microsoft Visual Studio

which version of VS 2017 are you running? I am currently running 15.7.5 here, which is the version I have tested this on. It is almost as if VA is not seeing changes to the solution, which has been known in earlier versions of VS2017, so I am wondering if that could be a factor here.

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

BeigeAlert
Junior Member

USA
16 Posts

Posted - Jul 30 2018 :  8:01:45 PM  Show Profile  Reply with Quote
Oh dear, yes that could very well be the issue: I'm running 15.1. I'm going to update now, and see if that fixes the issue.

EDIT: Yup, that did the trick! Thanks for your help.

If I don't survive, tell my wife "Hello".

Edited by - BeigeAlert on Jul 30 2018 9:49:02 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jul 31 2018 :  06:06:47 AM  Show Profile  Reply with Quote
Thank you for the update, yes, there was a problem with VA seeing changes to the solution in earlier versions of VS2017, which we had a work around for, but the best solution is to update the IDE, which you have now done.

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