Removing comments from code

Discussion forum about all things Gupta, OpenText and the community.
Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1257
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Removing comments from code

Post by Igor Ivanovic » 21 Mar 2019, 09:14

Hi,

If my memory serves me right, there was a little cdk utility which would strip all the comments from the code, but I couldn't find it anymore.
Anyone have any clue about it, or point me in the right direction?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Removing comments from code

Post by Dave Rabelink » 25 Mar 2019, 09:47

Hi Igor,

I can remember something similar, but can not find anything also.

The only thread I found is here from the newsgroups:

viewtopic.php?f=56&t=36115
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Removing comments from code

Post by Dave Rabelink » 25 Mar 2019, 10:50

I have used the posted sourcecode from the old newsgroup thread mentioned above and created a working application.

(saved as TD 2.1 text format)

A minor change to the original is that it does not delete the item when it is of type CDK_IT_Description, but instead clears the description text.
Items with type CDK_IT_Comment are deleted from the code.

You can download this CDK tool here:


https://samples.tdcommunity.net/index.p ... rch_mode=f
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1257
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Removing comments from code

Post by Igor Ivanovic » 27 Mar 2019, 13:06

Thanks Dave,

As always great help from your side. :D
Igor Ivanovic
Image

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests