-
Notifications
You must be signed in to change notification settings - Fork 425
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
Docu, new code samples: Kotlin versions, minor changes #1296
Conversation
- remove incorrect access modifier - add Kotlin version
Codecov Report
@@ Coverage Diff @@
## master #1296 +/- ##
=========================================
Coverage 93.78% 93.78%
Complexity 469 469
=========================================
Files 2 2
Lines 6948 6948
Branches 1864 1864
=========================================
Hits 6516 6516
Misses 146 146
Partials 286 286 Continue to review full report at Codecov.
|
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.
Wow, awesome work again!
The only think I would like to change is that I think we should keep Editor.defaultEditor
to represent the absence of choice by the end user, rather than just picking one of the actual editors as the default. I put more detailed comments with the proposed changes.
Other than that, it looks great!
docs/index.adoc
Outdated
"Example: edit --open=idea FILE opens IntelliJ IDEA (notice the '=' separator)", | ||
" edit --open FILE opens the specified file in the default editor" | ||
" edit --open FILE opens the specified file in eclipse" | ||
}) |
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.
Similar to the above, I think it is meaningful to have a defaultEditor
choice, so let's keep the original description.
docs/index.adoc
Outdated
// act as if the user specified --open=defaultEditor | ||
args.push(Editor.defaultEditor.name()); | ||
// act as if the user specified --open=eclipse | ||
args.push(editor.name()); |
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 think it is good to explicitly use the enum constant that represents the default, so Editor.defaultEditor
(or Editor.eclipse
if Eclipse were the default).
This is mostly for clarity: so that people reading this code example in the documentation would not have to refer back in the code to what the actual value would be.
I realize that in "real" code there is a tension here with the principle of having information in only once place. To be honest, I am not sure what I would do in a "real" application in this case. :-)
But for documentation purposes, I believe that duplicating the default value in the preprocessor is better because it requires less work on the part of the reader.
Great you like it!
I will work on this shortly, you may expect an updated PR soon.
Thank you! While working on this, two further issues came up that I would like to raise:
|
I'm okay to leave the release notes as they are, and just evolve the user manual. I see the release notes as more of a snapshot of how things were at some point in time, so there is some value in not updating them.
Oh, good catch! I had completely forgotten about this... It makes sense to publish Javadoc for the other jars, not just for the picocli jar, but also for picocli-groovy, picocli-jline2/3, picocli-spring-boot and picocli-codegen. The best way to deal with this is probably to update the
Swapping these in the manual makes sense; |
As an addition, we could develop/author an overview page that contains links to the apidocs of all subprojects. Once we made this overview page avaible at the subdomain apidocs.picocli.info, this URL could serve as single starting point for accessing all apidocs (just a proposal/ an idea). |
I created #1298 and put some ideas on how to deal with the Javadoc for the other modules there, let's discuss further on that ticket. |
I resolved all issues from your review meanwhile. |
Merged and published the HTML. Many thanks! |
…her improvements" This reverts commit 4183b20.
This reverts commit da13d9a.
…her improvements" This reverts commit 4183b20.
This reverts commit da13d9a.
This PR adds Kotlin versions for the new code samples in picocli 4.6 (
IModelTransformer
,IParameterProcessor
).While working on the
IParameterProcessor
sample, I made minor changes to the code sample and to the documentation in order to improve readability and intelligibility. I hope you like them.Additionally, I added a third column to the comparison table
PicocliBaseScript2
vs.PicocliBaseScript
.