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
 Command line options
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sumit
New Member

2 Posts

Posted - Jul 09 2018 :  1:05:28 PM  Show Profile  Reply with Quote
Are there any command line options available in VA?
I would like to run some command via command line (if available) and carry out some refactoring in source files.
I am trying to write a python/perl script to carry out this refactoring.

Edited by - Sumit on Jul 09 2018 1:08:56 PM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jul 10 2018 :  12:24:41 PM  Show Profile  Reply with Quote
No, unfortunately, Visual Assist is not designed to do that. We're an interactive application.

However, if you really want to do this, you may have some success using something like IDE macros:
https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.MacrosforVisualStudio

I didn't try this extension and I don't know if it would work, especially when you need to fill out a form (e.g. an editbox in a dialog).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 10 2018 :  12:53:31 PM  Show Profile  Reply with Quote
What sort of refactoring commands are you trying to use? I ask since I am not sure how you would script anything more complex than renaming code. Most other refactorings require you to decide what you want to do, and how to do it, before doing it.

If you are mainly looking at renaming, perhaps just look into a search and replace across the files, which should be easy to automate from a script with some simple command line tools.

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

Sumit
New Member

2 Posts

Posted - Jul 10 2018 :  3:51:38 PM  Show Profile  Reply with Quote
I am looking exactly at renaming symbols.
If I carry out a search and replace in the entire codebase, it would be prone to errors in the scenario where multiple classes have the same method name. I thought VA has some smartness to only replace symbol names for the intended class (its objects and pointers).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 10 2018 :  5:57:53 PM  Show Profile  Reply with Quote
VA does have this intelligence, but VA gets this knowledge by parsing the solution. Since VA is an extension, we are working "inside" the IDE, and the IDE loads the solution, and from here we know what files the solution contains, and then parse them from here.

Inside the IDE, we get the context information to know which symbol you are trying to refactor when you trigger the refactoring command.

VA is simply not designed to run from the command line.

Are you doing a massive amount of renaming? Or would you be able to do the required renaming inside the IDE, by using VA normally?

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