Author |
Topic |
|
Sumit
New Member
2 Posts |
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. |
Edited by - Sumit on Jul 09 2018 1:08:56 PM |
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
Sumit
New Member
2 Posts |
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
Whole Tomato Software
United Kingdom
19020 Posts |
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? |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|