ApexDoc integration

Issue #27 resolved
Scott Wells repo owner created an issue

Integrate ApexDoc (or perhaps SfApexDoc) into the editor (optionally-enabled):

  • Completion, highlighter, and formatter support for ApexDoc tags in block comments
  • Quick documentation shows ApexDoc rendering of the user-defined documentation
  • Starting a new documentation comment automatically fills out the ApexDoc based on a configurable code template and the documented identifier's signature

Comments (21)

  1. Mike Wannamaker

    What would be really nice is the ability to plugin your own.
    We have a fork of ApexDoc ourselves where we've added specific tags.
    Be nice if we could plugin our own apexdoc to use.

  2. nivgo

    Hi Scott, there is any update on this, or it was pushed down the list, just curious since last update was long time ago?


  3. Scott Wells reporter

    Hey, Niv. Yes, I can give an update. I'm planning to implement in this two phases. In the near-term (1.x) I plan to add support for filling in the header when you type /** based on the declaration details, so it would add things like @param and @returns as appropriate. In 2.0 I plan to add full support akin to what you'd have for JavaDoc in the IntelliJ IDEA Java editor with completion, syntax highlighting, reference navigation, generation of the actual docs when you use internal quick docs, etc. So there will be something soon, but the complete solution won't come until 2.0.

  4. Scott Wells reporter

    Okay, I went a wee bit deeper on this for 1.x than I'd originally intended. Basically I started implementing it and then just kept having that "just a little bit more" thing that pushed it to very near 100% feature completion. I'm hoping to release it tomorrow or Tuesday. Here's a quick preview of what's coming. Note that I've specifically targeted SfApexDoc as the implementation.


  5. Wim Velzeboer

    Great feature Scott!

    But I found one issue with the indentation, I use tabs as indentation and it seem that the alignment is not perfect (see image)

    Screen Shot 2017-09-21 at 09.18.52.png

  6. Neil Morris

    Very cool. Any chance we can drop in our own ApexDoc fork'd jar somehow with some additional annotation support?

  7. Scott Wells reporter

    Hey, Neil...I knew that question was coming! Unfortunately not right now. I'm actually not even using any ApexDoc jar in IC. It's a clean room reimplementation that builds on the fact that IC already has access to an AST for info about the documented declarations. As part of future configuration I have considered allowing you to tell IC about custom tags so that they're highlighted, available for completion, etc., but they wouldn't result in any special formatting in the integration quick documentation. I'd be curious to know about the tags you've added and their meanings so I can understand what would be missing in such an approach.

  8. Neil Morris

    We do a lot of passing maps from method to method and have been toying around with @ reads and @ sets to document values from the map that are either read out in a method or set in a method. I've also been thinking about ways we may auto-generate some of those comments but, we don't have the nice AST that IC has access to so, I have a feeling we would need to figure out that piece first or just try to hack together some basic file scraping in some scripting language.

  9. Neil Morris

    I was also noodling with the idea of an @ usage to call out any big impact on governor limits (called within a for-loop or executes DML/SOQL)

  10. Log in to comment