docProcessorGradlePlugin icon indicating copy to clipboard operation
docProcessorGradlePlugin copied to clipboard

Here's the revised commit message:

Open Jolanrensen opened this issue 6 months ago • 0 comments

Fix: Improve KDoc parameter rendering in IntelliJ plugin

This commit addresses issue #85 by enhancing how KDoc parameters are rendered in the KoDEx IntelliJ plugin. The rendering now takes into account the results of KDoc processing by KoDEx.

Key changes include:

  1. Structured KDoc Tags:

    • DocContent in kodex-common has been refactored to parse and store KDoc tags (like @param, @return) in a structured list (structuredTags) of KDocTag objects. Each KDocTag holds the tag name, its subject (e.g., parameter name), and its description.
    • DocumentableWrapper now uses this list of KDocTags, replacing the previous Set<String> of tag names.
  2. Service Layer Update:

    • DocProcessorService in kodex-intellij-plugin was updated to be compatible with the changes in DocumentableWrapper (specifically how copy() is called).
  3. Enhanced Documentation Provider:

    • DocProcessorInlineDocumentationProvider now utilizes the structuredTags from the processed DocContent.
    • It includes new logic (buildDocumentationHtml) to generate HTML for display in IntelliJ, with specific formatting for @param tags to correctly show their names and processed descriptions.
    • Fallback to default rendering is maintained if processed content isn't available.
  4. Unit Tests:

    • Added unit tests for DocContent in kodex-common to verify the correctness of the KDoc parsing into structuredTags.

These changes ensure that modifications made by KoDEx processors to KDoc tags (particularly @param descriptions) are accurately reflected in the documentation displayed within the IntelliJ IDEA, such as in quick doc popups and inline documentation.

Jolanrensen avatar Jun 04 '25 18:06 Jolanrensen