Fix javadoc markdown artifacts#15309
Conversation
|
Hey @AbhijitBhowmick! 👋 Thank you for contributing to JabRef! We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request. After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide. Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures. |
Review Summary by QodoConvert Javadoc to Markdown and standardize comment formatting
WalkthroughsDescription• Convert Javadoc comment style from /// to standard /**/ format • Replace ASCII art section dividers with // region: and // endRegion markers • Remove HTML list tags (<ol>, </ol>) from documentation comments • Improve code organization and readability with consistent comment formatting Diagramflowchart LR
A["Old Javadoc Style<br/>/// comments<br/>ASCII dividers"] -- "Convert to" --> B["Standard Format<br/>/* */ comments<br/>region markers"]
B -- "Applied to" --> C["4 Java Files<br/>AutoCompletion<br/>Preferences<br/>Fetcher<br/>Study Action"]
File Changes1. jabgui/src/main/java/org/jabref/gui/autocompleter/AutoCompletionTextInputBinding.java
|
Code Review by Qodo
1.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6880f85 to
2ededd5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
This endregion now does not have a start. Looks like the file was already using some region definitions which interfere with the new ones. Please revisit the region splitting w.r.t. whether it still makes sense. Perhaps some regions are obsolete, need adjustment or reorganization. Can you suggest an adjustment to the regions to solve this issue? Ideally without changing things too radically.
|
Okay, I found that in BTW it's a pity that when Javadoc introduced the |
There was a problem hiding this comment.
Can you please edit the endRegion markings for consistency? (In the whole file) endRegion vs endregion, endRegion vs endRegion: name.
According to https://eclipse.dev/eclipse/markdown/?f=news/4.36/jdt.md endregion it is.
There was a problem hiding this comment.
does intellj support them without colon?
There was a problem hiding this comment.
In the JabRef codebase both variants are mixed. So, either it does not matter, or you are already missing some in IntelliJ.
According to https://blog.jetbrains.com/idea/2012/03/custom-code-folding-regions-in-intellij-idea-111/ the concept is originally a VS thing, IntelliJ added support for their syntax. I struggle to find a proper reference for the syntax definitions in the VS docs (because they are terrible, have dead links, were partly retired etc), but the majority of examples and blog-posts I find use it without colon.
If IntelliJ simply supports both (colon is optional), I suggest we should agree on one version for consistency and apply it whenever possible.
There was a problem hiding this comment.
Okay, as a definite check, use the "Surround With" feature in IntelliJ. You will find, it does not use a colon.
There was a problem hiding this comment.
I have writtten as '''//endregion ''' and I will changes old ones(endRegion ->endregion)
There was a problem hiding this comment.
Yes we do not need colon after region.I will remove : after region (in 17 places).
| //************************************************************************************************************* | ||
| // ToDo: Cleanup | ||
| //************************************************************************************************************* | ||
| // region: Cleanup |
There was a problem hiding this comment.
I wonder what to do with this. Turning the cleanup-todo into a region Cleanup is misleading. Perhaps move the methods to the misc region? (or is there a better fit?) Unfortunately I do not know what the cleanup actually shall accomplish.
Perhaps, simply no region in this case, but just a // Todo: Cleanup comment (without ****... decoration).
There was a problem hiding this comment.
I am not sure about this Todo:CleanUp. I will keep it as // Todo: Cleanup comment .
There was a problem hiding this comment.
That's fine. It's arguably well beyond the scope of this issue.
This incorporates all the pending old Javadoc to Markdown changes required after merging JabRef#14891.The following files are changed: 1.AutoCompletionTextInputBinding.java 2.JabRefCliPreferences.java 3.SearchBasedParserFetcher.java 4.StartNewStudyAction.java 1.
1.File changed-JabRefCliPreferences.java
1.JabRefCliPreferences.java 2.SearchBasedParserFetcher.java
1.JabRefCliPreferences.java. The following changes are done:- 1.Added // endregion to maintain sync with region:AI And // region Push to application preferences and //region to Git 2.Changed region: to region 3.Changed region: Cleanup to previous ToDo: Cleanup 4.changed endRegion to end region 5.Adjusted dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)
39e8c75 to
9496f9b
Compare
This comment has been minimized.
This comment has been minimized.
1.JabRefCliPreferences.java. The following changes are done:- 1.Apply IntelliJ formatting
✅ All tests passed ✅🏷️ Commit: 204f156 Learn more about TestLens at testlens.app. |

Related issues and pull requests
Closes #14897
PR Description
1.This incorporates all the pending old Javadoc to Markdown changes required after merging #14891.
2.The following files are changed: 2.1.AutoCompletionTextInputBinding.java 2.2.JabRefCliPreferences.java 3.3.SearchBasedParserFetcher.java 4.4.StartNewStudyAction.java
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)