-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Prepare readding import command #13162
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
Conversation
| /** | ||
| * Common method to import a file with a specified format. | ||
| * | ||
| * @param filePath the path to the file to import |
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.
| public boolean append; | ||
|
|
||
| @Parameters(paramLabel = "<FILE>", description = "File to be imported.", arity = "1") | ||
| public String inputFile; |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck> reported by reviewdog 🐶
Blank line at end of block should be removed
| @Deprecated | ||
| record AppendFileOrUrlToCurrentLibrary(String location) implements UiCommand { } | ||
|
|
||
| record ImportFileToCurrentLibrary(String filePath, String format) implements UiCommand { } |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck> reported by reviewdog 🐶
Blank line at end of block should be removed
| import static picocli.CommandLine.Option; | ||
| import static picocli.CommandLine.Parameters; | ||
|
|
||
| @Command(name = "import", aliases = {"--import"}, description = "Import bibliography 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.
The command description should be in sentence case, not title case, to maintain consistency with other strings and labels.
| @Deprecated | ||
| record AppendFileOrUrlToCurrentLibrary(String location) implements UiCommand { } | ||
|
|
||
| record ImportFileToCurrentLibrary(String filePath, String format) implements UiCommand { } |
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.
The pull request title should contain a short title of the issue fixed or addressed, not just 'Fix issue xyz'. Ensure the title is descriptive of the changes made.
| this.startupMode = startupMode; | ||
| this.preferences = preferences; | ||
| this.guiCli = new GuiCommandLine(); | ||
| this.importSubCommandCli = new ImportSubCommand(); |
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.
Why manually? This should be done automatically by the annotations...
| private final Mode startupMode; | ||
| private final GuiPreferences preferences; | ||
| private final GuiCommandLine guiCli; | ||
| private final ImportSubCommand importSubCommandCli; |
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.
The variable name 'importSubCommandCli' should follow camel-case naming conventions. It should be 'importSubCommandCLI' to maintain consistency with other CLI-related variables.
|
Needs some more discussion closing as it is now. |
Fixes https://github.com/JabRef/jabref-issue-melting-pot/issues/925
TODO: handle null informat
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)