O$: adding/removing comments notationally

Das Goravani goravanis at gmail.com
Mon May 17 22:06:24 UTC 2021

> On May 17, 2021, at 2:37 PM, Grzegorz (Greg) Pasternak <gpasternak at cogeco.ca> wrote:
> Udo;
> Let's say for the sake of argument that all comments in the library needs to be removed.
> There are 2 types of comments:
> - comment line
> - command line that has the comment attached to it at the end
> I know I can read the method line by line and substitute the comments with empty string then write back.
> This would have to be repeated for all methods in the specific class.  This would have to be done for all classes.
> The code would be unlocked and this would be done in dev environment.
> As you can see the process is simple but it will take some time. I was hoping for something better than that.
> I would like this process to be automated and done after the the build from VCS.


All of the above is fine until second from last line.. “but it will take some time” is debatable.. I have a 20+ MB library with nearly 1000 classes, lots of code

And I have written and run things which do what you say, step through all classes all code line by line and search for things.. and replace them with some alternative string.. or clear the method line and leave it blank

And I found that it would whip through my library in seconds, like two seconds, maybe less.. it was mighty fast

I’ve done font replacement too which is similar.. say all reports replace any field whose font is 4 with font 20.. and there are many fields to be updated.. 


It’s done

As for “would like it to be automated”.. it’s just calling a method.. in which all is done, this code doesn’t end up all that large

“Done after VCS build”.. if you can rig that a method be called I suppose it can be done

I think Kelly and the like could give you tight Sendall’s that do a lot.. but the ability to both find and replace with full complexity of logic might drive you back to “line by line in class by class”.. 

The code I was going to post does the thing you seem to be dreading, in other words I do class by class then line by line

Sounds like you know how to do that

Best of luck with this

More information about the omnisdev-en mailing list