-
Notifications
You must be signed in to change notification settings - Fork 332
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
Added automatic mode selection #2168
base: develop
Are you sure you want to change the base?
Conversation
@@ -115,6 +120,30 @@ public void runViewer(File zipFile) throws IOException { | |||
JPlagRunner.runInternalServer(zipFile, this.inputHandler.getCliOptions().advanced.port); | |||
} | |||
|
|||
private void selectModeAutomatically() throws IOException, ExitException { |
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.
We should quickly discuss if we want to move calls like runViewer(runJPlag())
into their own method like runModeRunAndView()
, to make it clearer which mode got auto selected.
List<File> inputs = new ArrayList<>(); | ||
inputs.addAll(List.of(this.inputHandler.getCliOptions().newDirectories)); | ||
inputs.addAll(List.of(this.inputHandler.getCliOptions().oldDirectories)); | ||
inputs.addAll(List.of(this.inputHandler.getCliOptions().rootDirectory)); |
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 say we add the root directory first, just because it seems more logical
Co-authored-by: Alex | Kronox <[email protected]>
Quality Gate passed for 'JPlag Plagiarism Detector'Issues Measures |
Adapt readme |
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.
Blocker, as a reminder that the above comments are change requests
Also update the documentation JPlag/docs/1.-How-to-Use-JPlag.md Lines 120 to 130 in 10306cc
Inspiration may be found here #2171 or just redirect to that section |
Adds an implicit mode selection. The CLI will now detect the mode based on the input files.
From the documentation of the mode flag:
By default JPlag will automatically select the mode based on your input files. If none are selected the viewer will open on the file select screen. If a single result zip is selected it will be opened in the viewer directly. Otherwise JPlag will run on the submissions in the input files and show the result in the viewer.