-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating javadoc does not work for Test classes #14
Comments
Hi @HansenChristoffer , Madhav |
I am sorry @madhavd1 for have possibly wasted your time. I got a bit puzzled why you could not replicate my issue even after giving step-by-step instructions. So, I went back and tried again some more on my end. That is when I figured out that it might not be a bug but a feature or at least it might be expected to work like that from your point of view. My test cases were obviously not returning anything and were not taking any arguments so your extension did not create any Javadocs for them. I personally still do javadocs even if they do not return or take arguments, that is why I thought it was a bug. To clarify, your extension does only create javadoc blocks for methods that is either returning a value and/or taking argument(s). Edit: My project is a fresh quickstart maven project |
Hi @HansenChristoffer , I intentionally left out javadoc comments for methods without any params or returns. |
I understand. Personally I like to use Javadocs to document all my methods and classes. What they do and potentially what they return and take in argument. But the important part being what the method, function or class does. That being said, I would like to stress that this is just something I usually do personally. I can understand why you not generate javadocs on methods with no args or return. I just thought I would mention it in case it was a bug or not intended. But now that I know it is in fact intended behaviour then I can understand. It is not much work for me to manually add docs for the non-args non-return methods and also the class. Thanks for the extension and the work you do! |
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
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:
The text was updated successfully, but these errors were encountered: