-
|
The openedge-project.json file has "documentation" attributes, but how can these documents be generated? And what do you have to install to be able to generate these documents? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
|
You can use the JsonDocumentation task on the Progress ADE project. <?xml version="1.0"?>
<project name="ADE">
<taskdef resource="PCT.properties" />
<typedef resource="types.properties" />
<mkdir dir="db" />
<PCTCreateDatabase destDir="db" dbName="sample" structFile="sample.st" schemaFile="sample.df" dlcHome="${DLC}" auditing="true" auditArea="area1" auditIndexArea="area2" tablePartitioning="true" cdc="true" cdcArea="area1" cdcIndexArea="area2" />
<DBConnection dbDir="db" dbName="sample" singleUser="true" id="tmpdb">
<Alias name="stsdb" />
</DBConnection>
<path id="pp">
<pathelement location="businesscomponents" />
<pathelement location="corelib" />
<pathelement location="netlib" />
<pathelement location="seclib" />
<pathelement location="." />
</path>
<JsonDocumentation buildDir="build" destFile="corelib.json" dlcHome="${DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="corelib" includes="**/*.cls" />
<DBConnection refid="tmpdb" />
<propath refid="pp" />
</JsonDocumentation>
<JsonDocumentation buildDir="build" destFile="netlib.json" dlcHome="${DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="netlib" includes="**/*.cls" />
<DBConnection refid="tmpdb" />
<propath refid="pp" />
</JsonDocumentation>
... and so on ...
</project> |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, the doc's for netlib, corelib en businesscomponents are generated now. It is important that the buildDir points to the r-files. First I only got the names of the cls-files. ` ` |
Beta Was this translation helpful? Give feedback.
-
|
Hi Gilles, What's the content of sample.st and sample.df? Where do we find those? It is unclear how to generate those documentation files correctly. update:sample.st: sample.df: |
Beta Was this translation helpful? Give feedback.
-
|
I think I got it... I compiled the classes into the build folder before running the JsonDocumentation tasks. |
Beta Was this translation helpful? Give feedback.
-
|
Here is the full tasks file that I used, it might be useful to some: <?xml version="1.0"?>
<project name="ADE" default="documentation">
<property environment="env"/>
<taskdef resource="PCT.properties" classpath="${env.DLC}/pct/PCT.jar" />
<typedef resource="types.properties" classpath="${env.DLC}/pct/PCT.jar" />
<DlcHome value="${env.DLC}" />
<mkdir dir="doc" />
<mkdir dir="db" />
<PCTCreateDatabase destDir="db" dbName="sample" structFile="sample.st" schemaFile="sample.df" dlcHome="${env.DLC}" auditing="true" auditArea="area1" auditIndexArea="area2" tablePartitioning="true" cdc="true" cdcArea="area1" cdcIndexArea="area2" />
<DBConnection dbDir="db" dbName="sample" singleUser="true" id="tmpdb">
<Alias name="stsdb" />
</DBConnection>
<path id="pp">
<pathelement location="ablunit" />
<pathelement location="businesscomponents" />
<pathelement location="corelib" />
<pathelement location="netlib" />
<pathelement location="seclib" />
<pathelement location="." />
</path>
<target name="compilation" description="compilation of netlib, corelib, seclib and businesscomponents">
<PCTCompile destDir="build" paramFile="pct.pf" stopOnError="false" forceCompile="true" progPerc="10" multiCompile="true">
<fileset dir="netlib" includes="**/*.cls"/>
<fileset dir="corelib" includes="**/*.cls"/>
<fileset dir="businesscomponents" includes="**/*.cls"/>
<fileset dir="seclib" includes="**/*.cls"/>
<fileset dir="ablunit" includes="**/*.cls"/>
<DBConnection refid="tmpdb" />
<propath refid="pp" />
</PCTCompile>
</target>
<target name="documentation" description="generating documentation of netlib, corelib, seclib and businesscomponents" depends="compilation">
<JsonDocumentation buildDir="build" destFile="doc/netlib.json" dlcHome="${env.DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="netlib" includes="**/*.cls"/>
<propath refid="pp" />
</JsonDocumentation>
<JsonDocumentation buildDir="build" destFile="doc/corelib.json" dlcHome="${env.DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="corelib" includes="**/*.cls"/>
<propath refid="pp" />
</JsonDocumentation>
<JsonDocumentation buildDir="build" destFile="doc/seclib.json" dlcHome="${env.DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="seclib" includes="**/*.cls"/>
<DBConnection refid="tmpdb" />
<propath refid="pp" />
</JsonDocumentation>
<JsonDocumentation buildDir="build" destFile="doc/businesscomponents.json" dlcHome="${env.DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="businesscomponents" includes="**/*.cls"/>
<propath refid="pp" />
</JsonDocumentation>
<JsonDocumentation buildDir="build" destFile="doc/ablunit.json" dlcHome="${env.DLC}" encoding="iso-8859-1" indent="true">
<fileset dir="ablunit" includes="**/*.cls"/>
<propath refid="pp" />
</JsonDocumentation>
</target>
</project>I had to patch line 146 of corelib\OpenEdge\Core\EncodedString.cls: --- a/corelib/OpenEdge/Core/EncodedString.cls
+++ b/corelib/OpenEdge/Core/EncodedString.cls
@@ -143,7 +143,7 @@
else if lookup(string(mEncoding), EncodedString:EncodingNames) gt 0 then do:
// Allow any valid encoding prefix (encryption algorithm) in the list of non-retired options.
{&_proparse_ prolint-nowarn(overflow)}
- assign this-object:Value = audit-policy:encrypt-audit-mac-key(string(this-object:Value), string(mEncoding)).
+ assign this-object:Value = audit-policy:encrypt-audit-mac-key(string(this-object:Value)).
end.
else
// If we are unable to encode the value in ABL, throw an error. [Should never get here, but regardless...]
|
Beta Was this translation helpful? Give feedback.
You can use the JsonDocumentation task on the Progress ADE project.