Skip to content

Generating javadoc does not work for Test classes #14

@HansenChristoffer

Description

@HansenChristoffer

Expected Behavior

Javadoc comments gets generated above all methods in the file.

Current Behavior

After trying to use "Javadoc Tools: Generate Javadoc comments for open file" nothing happens. Nothing is generated.

Steps to Reproduce

  1. Open VSCode
  2. Create and/or open your Java project
  3. Make sure project/file structure is as it states in the "Current file structure" header below
  4. Create and/or open your test class
  5. Create and make sure there is one or more @test annotated method(s)
  6. Press: Ctrl+Shift+P
  7. Write javadoc tools: generate javadoc comments for open file
  8. Press enter

Context (Environment)

OS: Windows 10
VSCode Version: 1.62.1
JDK: AdoptOpenJDK 11.0.9.101 Hotspot
Project Dependencies: JUnit 4.11 [Test scope]
Extension Id: madhavd1.javadoc-tools
Extension version: Latest from Extensions
Extension requirements: All fulfilled

Detailed Description

This issue is the same for any type of generating tool with the extension that I've tested, not just with "gen in open file". Could this be because of project/file structure?
This has been tested in a non-test class and it successfully generates comments. Therefore we can conclude it is isolated to test classes, in this case.

Current file structure:

  • src ->
    • main ->
      • java ->
        • io ->
          • pewpew ->
            • app
    • test ->
      • java ->
        • io ->
          • pewpew ->
            • app

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions