Update docs

This commit is contained in:
Janne Valkealahti
2023-10-07 08:09:51 +01:00
parent 2e95fccbd5
commit 9a5f189783
17 changed files with 30 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
* xref:index.adoc[Overview]
* xref:getting-started.adoc[]
* xref:using-shell-basics.adoc[]
** xref:using-shell-basics-reading.adoc[]
* xref:basics/index.adoc[]
** xref:basics/reading.adoc[]
* xref:commands/index.adoc[]
** xref:commands/registration/index.adoc[]
** xref:commands/registration/programmatic.adoc[]
@@ -72,18 +72,18 @@
** xref:customization/singlecommand.adoc[]
** xref:customization/contextclose.adoc[]
* xref:using-shell-execution.adoc[]
* xref:using-shell-testing.adoc[]
** xref:using-shell-testing-basics.adoc[]
** xref:using-shell-testing-settings.adoc[]
* xref:testing/index.adoc[]
** xref:testing/basics.adoc[]
** xref:testing/settings.adoc[]
* Appendices
** xref:appendices-techical-intro.adoc[]
*** xref:appendices-techical-intro-registration.adoc[]
*** xref:appendices-techical-intro-parser.adoc[]
*** xref:appendices-techical-intro-execution.adoc[]
*** xref:appendices-techical-intro-commandcontext.adoc[]
*** xref:appendices-techical-intro-commandcatalog.adoc[]
*** xref:appendices-techical-intro-theming.adoc[]
*** xref:appendices-techical-intro-searchalgorithm.adoc[]
** xref:appendices/techintro/index.adoc[]
*** xref:appendices/techintro/registration.adoc[]
*** xref:appendices/techintro/parser.adoc[]
*** xref:appendices/techintro/execution.adoc[]
*** xref:appendices/techintro/commandcontext.adoc[]
*** xref:appendices/techintro/commandcatalog.adoc[]
*** xref:appendices/techintro/theming.adoc[]
*** xref:appendices/techintro/searchalgorithm.adoc[]
** xref:appendices-debugging.adoc[]
** xref:appendices/tui/index.adoc[]
*** xref:appendices/tui/viewdev.adoc[]

View File

@@ -1,6 +1,8 @@
[[command-catalog]]
= Command Catalog
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The `CommandCatalog` interface defines how command registrations exist in
a shell application. It is possible to dynamically register and de-register
commands, which gives flexibility for use cases where possible commands

View File

@@ -2,6 +2,8 @@
= Command Context
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The `CommandContext` interface gives access to a currently running
context. You can use it to get access to options:

View File

@@ -2,5 +2,7 @@
= Command Execution
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
When command parsing has done its job and command registration has been resolved, command execution
does the hard work of running the code.

View File

@@ -1,7 +1,7 @@
[#appendix-tech-intro-registration]
= Command Registration
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
Defining a command registration is a first step to introducing the structure of a command and its options
and parameters. This is loosely decoupled from what happens later, such as parsing command-line input and running

View File

@@ -1,7 +1,7 @@
[#appendix-tech-intro-searchalgorithm]
= Search Algorithms
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
`SearchMatch` is an interface to match _text_ with a _pattern_. Match
results are in a returned value `SearchMatchResult`. Match result

View File

@@ -1,7 +1,7 @@
[#appendix-tech-intro-theming]
= Theming
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
Styling in a theming is provided by a use of a _AttributedString_ from `JLine`.
Unfortunately styling in `JLine` is mostly undocumented but we try to go through

View File

@@ -6,7 +6,7 @@ ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
In this section, we go through an actual command registration and leave command options
and execution for later in a documentation. You can find more detailed info in
xref:appendices-techical-intro-registration.adoc[Command Registration].
xref:appendices/techintro/registration.adoc[Command Registration].

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-pathsearch]]
= Path Search
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The path search component asks base directory for scan and optional search expression.
Results are shown in a single select list where user can pick a path.
@@ -13,7 +13,7 @@ include::{snippets}/UiComponentSnippets.java[tag=snippet9]
----
NOTE: Logic for search is passed as is into algorithms documented
in xref:appendices-techical-intro-searchalgorithm.adoc[Search Algorithms].
in xref:appendices/techintro/searchalgorithm.adoc[Search Algorithms].
The following image shows typical output from a path search component:

View File

@@ -1,7 +1,7 @@
[[theming]]
= Theming
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
Current terminal implementations are rich in features and can usually show
something else that just plain text. For example a text can be styled to be
@@ -13,7 +13,7 @@ Spring Shell supports these via it's theming framework which contains two parts,
firstly _styling_ can be used to change text type and secondly _figures_ how
some characters are shown. These two are then combined together as a _theme_.
More about _theming_ internals, see xref:appendices-techical-intro-theming.adoc[Theming].
More about _theming_ internals, see xref:appendices/techintro/theming.adoc[Theming].
NOTE: Default theme is named `default` but can be change using property
`spring.shell.theme.name`. Other built-in theme named `dump` uses

View File

@@ -1,7 +1,7 @@
[[using-shell-testing-basics]]
= Basics
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
Spring Shell provides a number of utilities and annotations to help when testing your application.
Test support is provided by two modules: `spring-shell-test` contains core items, and

View File

@@ -2,7 +2,7 @@
= Testing
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
Testing cli application is difficult due to various reasons:

View File

@@ -1,7 +1,7 @@
[[using-shell-testing-settings]]
= Settings
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
Built in emulation uses terminal width 80 and height 24 on default.
Changing dimensions is useful if output would span into multiple