-
Notifications
You must be signed in to change notification settings - Fork 0
Hw5 #3
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
base: main
Are you sure you want to change the base?
Conversation
Zeglow
commented
Oct 22, 2025
Following AI code review suggestions:Fluent API improvement & enhancing JavaDoc AI assisted with: Fluent API improvement
…dation with null checks (AI-added) ; Enhanced JavaDoc (AI)
AI-assisted: improve existing JavaDoc and comments
|
I think |
espertusnu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work! Comments are just FYI.
|
|
||
| /** | ||
| * Represents a binding between a text input control and an auto-completion popup | ||
| * Represents a binding between a text input control and an auto-completion popup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix!
| * This class is a slightly modified version of {@link impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding} | ||
| * that works with general text input controls instead of just text fields. | ||
| * <p> | ||
| * Use the {@link Builder} to create instances of this class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
| }; | ||
|
|
||
| /** | ||
| * Private constructor to enforce the use of Builder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you now know, no javadoc for private members.
| * .inputAnalyzer(new CustomStrategy()) | ||
| * .showOnFocus(true) | ||
| * .build(); | ||
| * }</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
| * @param <T> the type of the suggestions | ||
| */ | ||
| public static class Builder<T> { | ||
| // Required parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good comments
| /** | ||
| * Represents the link to an external file (e.g. associated PDF file). | ||
| * This class is {@link Serializable} which is needed for drag and drop in gui | ||
| * This class is {@link Serializable} which is needed for drag and drop in gui. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
| * Constructor can also be used for non-valid paths. We need to parse them, because the GUI needs to render it. | ||
| * | ||
| * @param description the file description | ||
| * @param link the file link as string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally, you wouldn't say "as string" because the type information is shown in javadoc anyway.
|
|
||
| /** | ||
| * Creates a LinkedFile from a local file path. | ||
| * This is the most common way to create a LinkedFile for local files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not include information like this in javadoc since it's not part of the API.
| * | ||
| * @param description the file description | ||
| * @param link the file path | ||
| * @param fileType the file type, e.g., "PDF", "TXT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that the @param descriptions here are different from the ones in similar methods. They should ideally all be the same.
| * @param fileType the file type, e.g., "PDF", "TXT" | ||
| * @return a new LinkedFile instance | ||
| */ | ||
| public static LinkedFile of(String description, Path link, String fileType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see my instructions were unclear. I did not mean for the static factory methods to all have the same name. For example, this one could be called fromPath() or createFromPath().