Open jdcrensh opened 8 years ago
Interestingly, adding a blank access modifier (extra semicolon for private classes without modifier) to the -p
flag stopped the error. But doing so seems to have caused an infinite loop (no output, never exits)...
$ java -jar apexdoc.jar -s ./src/classes -p 'global;public;private;;testmethod;webService'
Removing public
from the -p
list allows the docs to be generated for everything else (with a long list of Error: null
).
If public
is the only value in the -p
list, docs are generated for public classes (still, lots of Error: null
output). The moment I add another modifier, the error occurs.
I have the same error. @jdcrensh were you able to solve this or do you have workaround?
I use parameters "-s C:\Users\user\workspace\project\src\classes -t C:\Users\user\workspace\project\docs"
I have debugged this, a few lessons I have learned so far:
@isTest class TestSomeTest {
Such classes are treated like private by Salesforce but misinterpreted by ApexDoc.
Hey guys, I know it's a bit off-topic but I am working on a cloud-based apex documentation tool. Still a working prototype with a few bugs, but the parsing is more robust and I would be very happy to get some feedback from real world projects if you want to give it a try. @Patlatus @jdcrensh
@eroispaziali, could you please share you code base? I have tried to run it but I believe it has got stuck. Probably if I look at the code I may understand why it has got stuck and why do you need so many permissions from the Salesforce organization
@eroispaziali Forcedocs is asking to:
Access your basic information Access and manage your data Provide access to your data via the Web Access and manage your Chatter data Provide access to custom applications Allow access to your unique identifier Access custom permissions Access and manage your Wave data Perform requests on your behalf at any time ???
Why this app needs so many permissions?
@Patlatus I gave up trying to get around the error, but nice find on a maintained ApexDoc. I'll have to give that a shot. For anyone else reading this, it has a GitLab repo at StevenWCox/sfapexdoc.
@jdcrensh Yeah, I like it. I even tried to modify it and fix the markup it generates and to make it possible to generate VisualForce pages instead of html pages.
@jdcrensh By the way, I have eventually fixed this null-pointer exception, but after that I have found another big bug. I prefer Steven's version since that one doesn't have so many critical bugs
@bohdan-dovhan Generating as VisualForce pages is a cool idea, but wouldn't that kind of pollute pages/
when there are a lot of classes? I have similar thought... How about packaging up the docs into a React/React-Router app as a static resource, which is served by a single page? I may put something like that together for the community when I have the time to revisit my documentation efforts, if I'm not beaten to it.
@jdcrensh Yeah, I totally agree that might pollute /pages/. So I was thinking about of packaging of all html files generated into a static resource itself (without any kind of react-router app), but it works if the size of compressed zip file is less than 5 Mb, if it is bigger, it is not possible to upload into Salesforce as a static resource
@jdcrensh I was also thinking of breaking the html files zipped into separate static resources, but in such case the interlinks will be broken. Also one junior developer from my team suggested to generate docs on the fly, but this solution requires too much development time. However, if we ever implemented this, it would be cool, since in such case we wouldn't have to use any kind of java application and we wouldn't have to retrieve classes first, then run java app, then load it back into a static resource or VisualForce pages or Google sites.
@Patlatus the particular issue you referenced in this comment will be fixed once the first release of a newly maintained version of this project is made.
Now top-level classes that are not explicitly given an access modifier are assumed to be private (@isTest
). This will also prevent the docs from ignoring inner classes not explicitly given an access modifier (which are also private by default)
Executing the program breaks with
NullPointerException
inClassModel#compare
. Paths given are relative toapexdoc.jar
, which is in my project root (also tried absolute paths). The two html paths given in the parameters do exist.The same error occurs when providing only the
-s
and-t
flags (and only the-s
flag), except that it shows nine lines ofError: null
instead of two.System: OS X El Capitan 10.11.3