Commit Graph

130 Commits

Author SHA1 Message Date
Janne Valkealahti
80ec92ea84 Document command availability
- Docs for annotation and registration
- Remove dynamic from header
- Move samples to snippets
- Fixes #1053
2024-05-23 09:09:49 +01:00
Janne Valkealahti
831f2cf54b Provide pty info
- Enhance ShellContext for pty info
- Enhance CommandContext to include ShellContext
- Fixes #985
2024-03-10 17:51:38 +00:00
Janne Valkealahti
2f1717464a Fix docs sample
- Fixes #1012
2024-03-10 15:44:21 +00:00
Janne Valkealahti
8705822ad3 Add initial ProgressView docs
- Relates #995
2024-02-17 15:52:00 +00:00
Janne Valkealahti
9830fafe1a Use CommandContext as method parameter
- With annotation(@Command) model it's now possible to just
  add CommandContext and it will get resolved and doesn't
  cause it to appear as an option.
- Fixes #779
2024-01-26 13:49:30 +00:00
Janne Valkealahti
a37bd6ad5a Fix alias handling with @Command annotation
- Revisit how alias commands are added using
  @Command annotation when using if/or on class
  and/or method level.
- With this change alias handling is more logical
  and there's better tests and docs.
- Fixes #945
2024-01-13 12:20:06 +00:00
Janne Valkealahti
56dffe0223 Add SelectItem to flow single selector api
- This change makes single/multi same on an api level
  where single selector used key/value map and multi
  selector used list of SelectItem's.
- We still keep use of map on a single select but those
  essentially go directly via SelectItem's.
- Fixes #946
2023-12-18 10:03:36 +00:00
Janne Valkealahti
90df641750 Update hotkey docs
- Relates #826
2023-12-10 09:53:20 +00:00
Janne Valkealahti
ead34d69e1 Update modal docs
- Relates #825
2023-11-23 09:08:17 +00:00
Janne Valkealahti
2d29050c34 Make Catalog browsers focusable with shortcuts
- Category and scenario list views can now be focused with
  ctrl+a/ctrl+s.
- Bind all keys with ctrl modifier
- Add "shortcut" concept to views which currently hooks to
  hot keys.
- In a catalog app by using a "shortcut" then takes the key
  event as a hot key, as it consumes resulting behaviour
  is to focus.
- Move view initInternal away from constructor call to
  require user to call init() which is not in a
  View interface
- Relates #826
2023-11-12 16:43:11 +00:00
Janne Valkealahti
ccf6d771d9 Add multiinput scenario
- InputView using viewcommands and has event for text change.
- Experimental way to handle tab navigation in a layout views.
- New viewcommands for tab navigation and moving cursor.
- Mouse click takes focus in AbstractView if no view command
  binding.
- MultiInputViewScenario now shows tab navigation.
- Fixes #917
2023-11-07 08:26:43 +00:00
Janne Valkealahti
bba7a82ab4 Make StatusBarView work with hotkeys
- StatusItem can now define a hotkey which is then
  bound to its action.
- In catalog app replace use of raw key event to
  item's hotkey for status bar visibility.
- Various doc updates.
- Relates #826
2023-10-30 09:31:03 +00:00
Janne Valkealahti
db3f67784a Update docs 2023-10-28 09:16:42 +01:00
Janne Valkealahti
92eb7dd2b7 Relocate message package from view
- Relates #813
2023-10-20 08:48:36 +01:00
Janne Valkealahti
433c1f96f0 Relocate geom package from view
- Relates #813
2023-10-20 08:38:01 +01:00
Janne Valkealahti
d77bcac59c Update docs 2023-10-20 08:07:17 +01:00
Janne Valkealahti
860c8dcb93 Migrate docs shell samples to asciinema
- Update antora settings
- Move cast files and remove old ones
- Switch shell svg's to asciinema
- Fixes #884
2023-10-14 15:45:09 +01:00
Janne Valkealahti
f4eec7b809 Update docs 2023-10-08 15:16:20 +01:00
Janne Valkealahti
923498bbcf Update docs 2023-10-07 15:23:24 +01:00
Janne Valkealahti
1417e33f92 Update docs 2023-10-06 15:34:37 +01:00
Janne Valkealahti
89a829cfef Update docs 2023-10-06 13:40:48 +01:00
Rob Winch
9b5ed3a9eb Migrate Structure 2023-08-03 11:11:12 -05:00
Rob Winch
2ba6990f72 Remove unused using-shell-options-generic.adoc 2023-08-03 10:28:09 -05:00
Janne Valkealahti
a0bdbfc033 Initial terminal ui implementation
- This commit adds proof of concept work for terminal ui as is.
- Some things work, some don't but we need to start from somewhere.
  Further development continues in a main.
- Essentially we are starting to have enough so that it merits to
  move all this work into a main repo.
- Everything new is kept under org.springframework.shell.component.view
  and will get revisiter later to find correct locations for some classes.
- Catalog sample has been modified to provide "showcase" app for
  terminal ui features. This is a start while it already contains
  some usefull scenarios.
- Relates #800
- Relates #801
- Relates #802
- Relates #803
- Relates #804
- Relates #805
- Relates #806
- Relates #807
- Relates #808
- Relates #809
- Relates #810
- Relates #811
2023-07-15 16:42:39 +01:00
Janne Valkealahti
6fd1a1c78a Add primary command docs
- Relates #755
2023-07-05 10:34:17 +01:00
Janne Valkealahti
df40964e7b Document CommandNotFoundMessageProvider
- Relates #778
2023-06-23 06:30:30 +01:00
Janne Valkealahti
7f9efd1374 Fix docs for option label
- Relates #732
2023-05-01 17:27:05 +01:00
Janne Valkealahti
a0ad3ad797 Support label with @Option
- Add `label` field into `@Option`. This sets option label if
  `label` field has any text.
- Fixes #732
2023-05-01 17:11:03 +01:00
Janne Valkealahti
755cf66350 Update annotation docs
- Relates #637
2023-05-01 09:25:23 +01:00
Janne Valkealahti
9d27466c6a Support explicit arity min max with @Option
- @Option now has arityMin/arityMax which if defined,
  non-negative, are used instead of arity.
- Fixes #731
2023-05-01 08:36:41 +01:00
Janne Valkealahti
c36aa41878 Use tabs in samples
- Use tabbing model from a new docs backend.
- Relates #637
2023-05-01 08:29:37 +01:00
Janne Valkealahti
b934ddeccb Polish 2023-04-10 15:56:11 +01:00
Janne Valkealahti
5a4a241cb8 Refactor short option docs
- Add e2e samples
- Add short option snippets as tabs content(to get later
  converted to an actual tabs).
- Relates #637
2023-04-10 14:48:57 +01:00
Janne Valkealahti
62e469be49 Polish naming in docs
- Relates #637
2023-04-08 17:15:47 +01:00
Janne Valkealahti
efbc223118 Refactor option basic docs
- Document better a relationship between annotation,
  legacy annotation and programmatic registration.
- Relates #637
2023-04-07 16:54:55 +01:00
Janne Valkealahti
575d95428b Update docs copyright year 2023-03-18 16:50:38 +00:00
Janne Valkealahti
a9c52e2a19 Add notes to docs about new annotation model
- Relates #637
2023-03-18 16:40:34 +00:00
Simon Verhoeven
60126b9c47 Rename setMaskCharater to setMaskCharacter 2023-03-12 16:08:54 +00:00
Janne Valkealahti
fd73531986 Document @Option long name
- Relates #637
2023-02-24 12:18:16 +00:00
Janne Valkealahti
07e08b36a7 Document registration with @Command
- Split and separate new annotations with legacy annotations
  on a registration level.
- Relates #637
2023-02-24 09:55:26 +00:00
Janne Valkealahti
44734fd634 Rename command registration doc files 2023-02-23 09:57:42 +00:00
Janne Valkealahti
a95e60dd8b Test terminal can set dimensions
- ShellTest now has fields which can be used to
  change terminal default widht/height.
- Backed by properties so can be used with
  `spring.shell.test.terminal-width` and
  `spring.shell.test.terminal-height`.
- Fixes #656
2023-02-05 15:24:36 +00:00
Janne Valkealahti
2f298ccb6a Define CommandExceptionResolver bean order
- CommandParserExceptionResolver uses default bean
  order -100.
- Fixes #634
2023-01-25 17:57:13 +00:00
Janne Valkealahti
56b9cb20ef Document String array option type
- Fixes #628
2023-01-19 11:32:37 +00:00
Janne Valkealahti
a04091c08f Support modify option names
- New OptionNameModifier which is just a Function<String,String> to
  modify a name.
- Can be defined per option in CommandRegistration.
- Can be defined as global default as bean.
- Default implementation for common case types is enabled via boot's
  config props under spring.shell.option.naming.case-type
- Support facilities for camel, kebab, snake and pascal conversions.
- Fixes #621
2023-01-15 10:02:55 +00:00
Janne Valkealahti
95e2829dc3 Revisit positional arguments
- Add better mapping logic
- Add better type conversion
- More docs for arity and positional option configuration
- Fixes #616
2023-01-13 15:11:38 +00:00
Janne Valkealahti
f91b255bda Create BuilderSupplier interface
- Fixes #607
2023-01-08 13:38:33 +00:00
Janne Valkealahti
bf2692c70c Support exception handling with annotated methods
- New annotations ExceptionResolver and ExitCode
- New needed functionality is in classes ExceptionResolverMethodResolver
  and MethodCommandExceptionResolver.
- Hook these annotations with StandardMethodTargetRegistrar and Shell classes
- Fixes #597
2023-01-01 14:51:05 +00:00
Janne Valkealahti
b98cb4926d Fix typo
- Relates #579
2022-12-08 10:02:46 +00:00
Janne Valkealahti
83e906d2e7 Document writing to console
- Relates #579
2022-12-08 09:51:59 +00:00