Markus Wollny
02/14/2022, 4:16 PMbdw429s
02/14/2022, 4:35 PMbdw429s
02/14/2022, 4:36 PMbdw429s
02/14/2022, 4:38 PMMarkus Wollny
02/15/2022, 8:23 AMpothys-mitrahsoft
02/15/2022, 11:06 AMbdw429s
02/15/2022, 6:39 PMbdw429s
02/15/2022, 6:40 PMbdw429s
02/15/2022, 6:40 PMmborn
02/15/2022, 6:41 PMstatic
properties for a while, until we discovered it was breaking in Lucee... so we changed to standard component property name=
syntax.bdw429s
02/15/2022, 6:42 PMmborn
02/15/2022, 6:42 PMstatic
through its paces. We may just need a test or two to get it working on Lucee 5.3.9+.mborn
02/15/2022, 6:43 PMstatic
properties existed if getComponentMetadata()
doesn't expose them.bdw429s
02/15/2022, 6:44 PMbdw429s
02/15/2022, 6:44 PMbdw429s
02/15/2022, 6:44 PMbdw429s
02/15/2022, 6:45 PMMarkus Wollny
02/16/2022, 6:49 AM# quick replace of static methods with a prefixed method name
#directoryList path=.\cfc listInfo="path" filter="*.cfc" type="file" recurse="true" | #arrayToList | forEach command="sed --file \${item} 's~static(.*?)function (\S)~\1 function staticFuncZZZ\2~gi' > \${item}" delimiter=","
# generate the docs
docbox generate source=.\cfc mapping=[packageName] strategy-outputDir=./doc strategy-projectTitle="My Title"
# reset the changes made by initial replace
!git restore --source=HEAD --staged --worktree -- .\cfc
#directoryList path=.\doc listInfo="path" type="file" filter="*.html" recurse="true"| #arrayToList | forEach command="sed --file \${item} 's~staticFuncZZZ~[static] ~gi' > \${item}" delimiter=","
If I had to extend that to care about static properties, it wouldn't be much of an issue, I guess. The biggest problem here is that I temporarily mess up the actual source code and rely on git to revert that mess, so if a user is not careful to never run this on the same working directory he/she is currently working on, there's going to be a painful mistake some day. That's why I recommend doing DocBox runs in a separate hierarchy at the moment. And this imposes a certain additional hassle that would be nice to get rid of.
Attached is an example what this looks like in my DocBox output. As I'm using a simple search&replace strategy, there's not much sophistication behind it. One could argue however, that if DocBox would do the static processing on its own, it might be preferrable to have static methods (and properties) additionally grouped in tabs in the Method Summary block - so in the overview we'd see a default tab "All Methods" with static methods prefixed "static" in some way and one or two additional filtered tabs labeled "Instance Methods" (for non-static) and "Static Methods" (or maybe better "Concrete Methods" ?). If tabs are too much of a hassle, grouping all static methods to one end of the method list may be another option.bdw429s
02/16/2022, 8:10 PMdirectoryList | #arrayToList | forEach
magic ๐bdw429s
02/16/2022, 8:11 PMtokenReplace
command and would it make that easier?bdw429s
02/16/2022, 8:11 PMMarkus Wollny
02/17/2022, 6:39 AMbdw429s
02/17/2022, 7:13 PMsed
is powered by CFML's reReplace()
functions in the background ๐ช