-
Notifications
You must be signed in to change notification settings - Fork 1
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
Code Completion in Javadoc Comments #12
Comments
I wonder if Justin accidentally added /** instead of /*, and that's why he saw some completion.
Yes, this comes from the language server, and it appears to be intentional.
I have no idea why VSCode behaves differently here. There are indeed using the same language server. It could be that different versions of the language server or different versions of the JDK provide slightly differing behaviors. The VSCode extension might be using a different default value for a setting than the language server. For reference, the language server is developed by Eclipse, while the VSCode extension is developed by Red Hat. It's possible that the teams have a disagreement on what should be default. Regardless, this appears to be similar intentional behavior to me. I would be wary to consider it a bug. Even if you want to consider it a bug, I'm not sure how I would tell the language server to change this behavior. There probably aren't any settings for that level of granularity.
Moonshine's text editor supports "auto-closing pairs", but it looks like I haven't added any type of comments in the pairs specified in Moonshine's language syntax plugins. Only brackets so far. I may have simply forgotten to add them. I'll add this to my to-do list. |
The VSCode behavior for this case is fine if we want to stick with that. I could see both the VSCode and Eclipse behavior being annoying in some cases, so this may have just been a developer preference. I am a little out of date on Eclipse (2020-09), so that could also explain the difference. I had some more thoughts about the comment completion, so I created #13. |
I see some strange behavior for code completion in JavaDoc (/**) comments. @JustinProminic reported similar issues for
/*
and//
comments, but I couldn't reproduce this.I think this is intentional, though. You can see that it gives me an option to generate an @link, which is something I use in Eclipse. Completing the class name could potentially be nice when writing the documentation as well.
However, it does feel a little strange when the auto-complete triggers at the end of a sentence like this. Also, I see it won't allow me to complete methods.
Here are some Javadoc actions I do in Eclipse.
In Moonshine, I see:
Here is the behavior I see for Visual Studio Code (which uses the same language server, right?).
I'm fine with matching either behavior. Note that the procedure for VS Code also involves text-only completion and comment completion. We can ignore the text-only completion for now to avoid confusion with the language servers, and I'll plan to create a separate issue for comment completion.
This is a moderate priority. I can work around the issue pretty easily, but it does cause frustration when it triggers at the end of sentences.
The text was updated successfully, but these errors were encountered: