T O P I C R E V I E W |
Sumit |
Posted - Jul 09 2018 : 1:05:28 PM 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. |
4 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jul 10 2018 : 5:57:53 PM 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? |
Sumit |
Posted - Jul 10 2018 : 3:51:38 PM 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). |
feline |
Posted - Jul 10 2018 : 12:53:31 PM 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. |
accord |
Posted - Jul 10 2018 : 12:24:41 PM 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). |