diff --git a/spring-shell-docs/modules/ROOT/nav.adoc b/spring-shell-docs/modules/ROOT/nav.adoc index b5bf5601..2746bab5 100644 --- a/spring-shell-docs/modules/ROOT/nav.adoc +++ b/spring-shell-docs/modules/ROOT/nav.adoc @@ -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[] diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcatalog.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcatalog.adoc similarity index 94% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcatalog.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcatalog.adoc index 0cc61cec..3410b0d7 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcatalog.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcatalog.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcontext.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcontext.adoc similarity index 84% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcontext.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcontext.adoc index 9eb50a2d..6a8d390a 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcontext.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/commandcontext.adoc @@ -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: diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-execution.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/execution.adoc similarity index 70% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-execution.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/execution.adoc index 954f83ce..a27a0f59 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-execution.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/execution.adoc @@ -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. diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/index.adoc similarity index 100% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/index.adoc diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-parser.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/parser.adoc similarity index 100% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-parser.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/parser.adoc diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-registration.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/registration.adoc similarity index 97% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-registration.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/registration.adoc index 416bf891..fc9957ab 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-registration.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/registration.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-searchalgorithm.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/searchalgorithm.adoc similarity index 94% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-searchalgorithm.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/searchalgorithm.adoc index a7f8ac7d..e319fc77 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-searchalgorithm.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/searchalgorithm.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-theming.adoc b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/theming.adoc similarity index 95% rename from spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-theming.adoc rename to spring-shell-docs/modules/ROOT/pages/appendices/techintro/theming.adoc index 8320c47d..c625df3e 100644 --- a/spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-theming.adoc +++ b/spring-shell-docs/modules/ROOT/pages/appendices/techintro/theming.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-basics.adoc b/spring-shell-docs/modules/ROOT/pages/basics/index.adoc similarity index 100% rename from spring-shell-docs/modules/ROOT/pages/using-shell-basics.adoc rename to spring-shell-docs/modules/ROOT/pages/basics/index.adoc diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-basics-reading.adoc b/spring-shell-docs/modules/ROOT/pages/basics/reading.adoc similarity index 100% rename from spring-shell-docs/modules/ROOT/pages/using-shell-basics-reading.adoc rename to spring-shell-docs/modules/ROOT/pages/basics/reading.adoc diff --git a/spring-shell-docs/modules/ROOT/pages/commands/index.adoc b/spring-shell-docs/modules/ROOT/pages/commands/index.adoc index 663af418..2662bfe8 100644 --- a/spring-shell-docs/modules/ROOT/pages/commands/index.adoc +++ b/spring-shell-docs/modules/ROOT/pages/commands/index.adoc @@ -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]. diff --git a/spring-shell-docs/modules/ROOT/pages/components/ui/pathsearch.adoc b/spring-shell-docs/modules/ROOT/pages/components/ui/pathsearch.adoc index 8b4782f4..7bdcc8f4 100644 --- a/spring-shell-docs/modules/ROOT/pages/components/ui/pathsearch.adoc +++ b/spring-shell-docs/modules/ROOT/pages/components/ui/pathsearch.adoc @@ -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: diff --git a/spring-shell-docs/modules/ROOT/pages/customization/styling.adoc b/spring-shell-docs/modules/ROOT/pages/customization/styling.adoc index 3d478138..242f3964 100644 --- a/spring-shell-docs/modules/ROOT/pages/customization/styling.adoc +++ b/spring-shell-docs/modules/ROOT/pages/customization/styling.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-testing-basics.adoc b/spring-shell-docs/modules/ROOT/pages/testing/basics.adoc similarity index 87% rename from spring-shell-docs/modules/ROOT/pages/using-shell-testing-basics.adoc rename to spring-shell-docs/modules/ROOT/pages/testing/basics.adoc index 7535eb60..78998b58 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-testing-basics.adoc +++ b/spring-shell-docs/modules/ROOT/pages/testing/basics.adoc @@ -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 diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-testing.adoc b/spring-shell-docs/modules/ROOT/pages/testing/index.adoc similarity index 87% rename from spring-shell-docs/modules/ROOT/pages/using-shell-testing.adoc rename to spring-shell-docs/modules/ROOT/pages/testing/index.adoc index 34e4d505..9f9bd7ff 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-testing.adoc +++ b/spring-shell-docs/modules/ROOT/pages/testing/index.adoc @@ -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: diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-testing-settings.adoc b/spring-shell-docs/modules/ROOT/pages/testing/settings.adoc similarity index 89% rename from spring-shell-docs/modules/ROOT/pages/using-shell-testing-settings.adoc rename to spring-shell-docs/modules/ROOT/pages/testing/settings.adoc index c01c4c8e..ae6e37c0 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-testing-settings.adoc +++ b/spring-shell-docs/modules/ROOT/pages/testing/settings.adoc @@ -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