OEDTdoc style comment support

The SmartComponent Library supports developers with source code utilizing the Progress Developer Studio comment style, for quick access on the class purpose, method and property usage and as an alternative, the OEDT docstyle comment style which offers advanced code documentation support. OEDT docstyle has the advantage of offering a great extension for Progress Developer Studio which will surely boost your productivity.  

Details about OEDT can be found at www.omecra.de/home 

Enabling OEDTdoc style comments for the Business Entity Designer

To enable OEDT style comments for Business Entity Designer you only have to enable the Consultingwerk.BusinessEntityDesigner.Plugins.OedtCommentStylePlugin plugin for the Business Entity Designer. 

  1. Start the Business Entity Designer  

  2. Go to File 

  3. Select Options (bottom right corner) 

  4. Go to Plugins 

  5. Make sure that Consultingwerk.BusinessEntityDesigner.Plugins.OedtCommentStylePlugin does not have “#” before it. If it does, remove the “#”. 
    NOTE: If you are missing the plugin, please click on “Select Plugin” option instead, search for: Consultingwerk.BusinessEntityDesigner.Plugins.OedtCommentStylePlugin select it and then click OK to add it to your plugin list, then make sure it was added according to the 5th step. 

  6. Click Ok.

Enabling OEDTdoc style comments for scl-gen

To enable OEDT style comments for scl-gen you have to make sure that in the .applicationsettings file, the “SclGenCommentFormat” value is set to the “OEDT” value such as:

"SclGenCommentFormat": "OEDT" 

For more information about the scl-gen tool, please check:
https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/8094574/Scaffolding+utility+for+common+utility+classes?search_id=18a27e6d-43ba-4576-83fa-13a65c712372  

Using the Batch Formatter and single file Formatter

Going through all your code to change Progress Developer Studio comments to the OEDT standard would cost a lot of time. To improve on this we have developed a class file, if developers want to change large amounts of existing source code to the OEDT standard we support two methods which also replace your tabs with spaces and eliminates dangling spaces from the end of your line:

  • The Batch Comment Formatter to rewrite all files in a directory, replacing the Progress Developer Studio comments with OEDT standard comments, or have the option to create the formatted versions at the specified target path. 

  • The Comment Formatter to rewrite a single file, replacing the Progress Developer Studio comments with OEDT standard comments, or have the option to create the formatted version at the specified target path.

Please create a backup of your source code before using any of those tools to avoid irreversible damage to your source code. 

CommentFormatter

/* CommentFormatter - used to format single files */  /* Here is how you define and instantiate */  DEFINE VARIABLE oFormatter AS CommentFormatter NO-UNDO .  oFormatter = NEW CommentFormatter() .  /* If you only specify the name of the file, the tool will overwrite the existing * file with the OEDT format comments */  oFormatter:FormatComments("Consultingwerk/TestClass.cls") .  /* If you also specify the second parameter, a formatted copy of the file will *be created at the target folder */  oFormatter:FormatComments("Consultingwerk/TestClass.cls", "OutputFolder") . 

BatchCommentFormatter

/* BatchCommentFormatter - used to format entire package folders */  /* Here is how you define and instantiate */  DEFINE VARIABLE oBatchFormatter AS BatchCommentFormatter NO-UNDO .  oBatchFormatter = NEW BatchCommentFormatter() .  /* If you specify the path name and file extension, the tool will overwrite the existing * files with the OEDT format comments */  oBatchFormatter:FormatComments("Consultingwerk/", ".cls") .  /* If you also specify the 3rd parameter, formatted copies of the files will be created * at the target folder */  oBatchFormatter:FormatComments("Consultingwerk/", ".cls", "OutputFolder") . 

Enabling the SmartUnit Testrunner for OEDTdoc style comments

The SmartUnit Testrunner offers the option to check that the whole source code of an application uses only OEDT Style comments. This is highly advised when working with existing source code and it’s your decision to convert all Progress Developer Studio Style comments to the OEDT docstyle. 

For this to work – we will provide you with a sample ant script

<!-- * Validation of parameter comment style *--> <SmartUnit testrunner="Consultingwerk.StudioTest.OedtCommentTest.OedtCommentValidatorTestRunner" testSuite="Parameter Comment Validator" tests="Consultingwerk.*" output="${Full.Workspace.TestResults.Directory}/oedt-comments.xml" haltOnError="false" forceXmlXref="false" baseDirectory="../ABL"> <options> <propath refid="Unittest.Propath" /> </options> </SmartUnit>

After this is done, you can execute the ant script by executing a command similar to the following:
c:\Progress\PCT116\ant\bin\ant -f your-build-file.xml your-target-name -Dprogress.DLC=%dlc%