Migrate docs to antora

- This is basically copy from main branch minus all
  terminal ui things.
- Relates #971
This commit is contained in:
Janne Valkealahti
2024-01-12 14:02:10 +00:00
parent 09d4bfed51
commit 814ed4958f
108 changed files with 637 additions and 1037 deletions

View File

@@ -0,0 +1,59 @@
[[using-shell-options-optional]]
= Optional Value
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
An option is either required or not and, generally speaking, how it behaves depends on
a command target.
Making option optional.
[tabs]
======
Programmatic::
+
[source,java,indent=0,role="primary"]
----
include::{snippets}/OptionSnippets.java[tag=option-optional-programmatic]
----
Annotation::
+
[source,java,indent=0,role="secondary"]
----
include::{snippets}/OptionSnippets.java[tag=option-optional-annotation]
----
Legacy Annotation::
+
[source,java,indent=0,role="secondary"]
----
include::{snippets}/OptionSnippets.java[tag=option-optional-legacyannotation]
----
======
Making option mandatory.
[tabs]
======
Programmatic::
+
[source,java,indent=0,role="primary"]
----
include::{snippets}/OptionSnippets.java[tag=option-mandatory-programmatic]
----
Annotation::
+
[source,java,indent=0,role="secondary"]
----
include::{snippets}/OptionSnippets.java[tag=option-mandatory-annotation]
----
Legacy Annotation::
+
[source,java,indent=0,role="secondary"]
----
include::{snippets}/OptionSnippets.java[tag=option-mandatory-legacyannotation]
----
======