-
Notifications
You must be signed in to change notification settings - Fork 30
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
Feature/3274/use-current-directory-if-input-empty #3319
Merged
moritz-suckow-mw
merged 14 commits into
main
from
feature/3274/use-current-directory-if-input-empty
Jun 6, 2023
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
80aa8e8
Use current directory for RawTextParser if input empty #3274
moritz-suckow-mw 03fa2aa
Merge branch 'main' into feature/3274/use-current-directory-if-input-…
moritz-suckow-mw a741e79
Remove conversion of empty input, add default for RawTextParser#3274
moritz-suckow-mw 31331f6
Add hints/defaults to all input questions, adjust tests #3274
moritz-suckow-mw a47b51d
Merge branch 'main' into feature/3274/use-current-directory-if-input-…
moritz-suckow-mw d348792
Add changelog entry #3274
moritz-suckow-mw 44b7197
Integrate review feedback #3274
moritz-suckow-mw b516164
Add working directory as default to parser suggestion and fix typos #…
moritz-suckow-mw 3234b75
Reword question for additional csv input files #3274
moritz-suckow-mw 6ffda55
Merge branch 'main' into feature/3274/use-current-directory-if-input-…
moritz-suckow-mw 84d194d
Update changelog #3274
moritz-suckow-mw 3b6203b
Merge branch 'main' into feature/3274/use-current-directory-if-input-…
moritz-suckow-mw 87a870a
Remove gitlogparser assuming working directory if null input #3274
moritz-suckow-mw a45b5b7
Remove some duplication #3274
moritz-suckow-mw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...SVImporter/src/main/kotlin/de/maibornwolff/codecharta/importer/util/ParserDialogHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package de.maibornwolff.codecharta.importer.util | ||
|
||
import com.github.kinquirer.KInquirer | ||
import com.github.kinquirer.components.promptInput | ||
import java.io.File | ||
import java.nio.file.Paths | ||
|
||
class ParserDialogHelper { | ||
|
||
companion object { | ||
fun getInputFiles(isSourceMonitor: Boolean): MutableList<String> { | ||
val inputFileNames = mutableListOf(KInquirer.promptInput( | ||
message = if (isSourceMonitor) { "What is the SourceMonitor CSV file that has to be parsed?" } else { "Please specify the name of the first CSV file to be parsed." }, | ||
hint = Paths.get("").toAbsolutePath().toString() + File.separator + "yourInput.csv")) | ||
|
||
while (true) { | ||
val additionalFile = KInquirer.promptInput( | ||
message = "If you want to parse additional CSV files, specify the name of the next file. Otherwise, leave this field empty to skip.", | ||
) | ||
if (additionalFile.isNotBlank()) { | ||
inputFileNames.add(additionalFile) | ||
} else { | ||
break | ||
} | ||
} | ||
|
||
return inputFileNames | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 just made this class to avoid some duplication, only thing new here is the KInquirer hint.