Skip to content

Commit 9298fdd

Browse files
committed
Add placeholder TODOs into the User Guide (#35)
1 parent 4c9f2ae commit 9298fdd

File tree

11 files changed

+37
-11
lines changed

11 files changed

+37
-11
lines changed

guide/annotations/cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ As with commands typically we also want to add a `description` that describes wh
3333
defaultCommand = GettingStarted.class,
3434
commands = { GettingStarted.class, Tool.class })
3535
public class BasicCli {
36-
```
36+
```
37+
38+
**TODO Write up the rest of the @Cli annotation**

guide/annotations/command.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,8 @@ public class Tool { }
5959

6060
Here we add our command to the `common` group, we also add it to the `bar` group which is a sub-group of the `foo` group.
6161

62-
Note that since command and group names cannot contain whitespace **any** whitespace in the specified group names is interpreted as a separator and thus treated as a path to the actual group you want to place your command in.
62+
Note that since command and group names cannot contain whitespace **any** whitespace in the specified group names is interpreted as a separator and thus treated as a path to the actual group you want to place your command in.
63+
64+
{% include alert.html %}
65+
You can also specify groups by using the [`@Group`](group.html) annotation or as part of the [`@Cli`](cli.html) annotation.
6366

guide/annotations/discussion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ To add a discussion section simply add the `@Discussion` annotated to a class li
1818
"We can have as many paragraphs as we feel are necessary"})
1919
public class MyClass { }```
2020

21-
The annotation takes a single `paragraphs` field which takes a `String[]` array where each entry in the array is treated as a separate paragraph.
21+
The annotation takes a single `paragraphs` field which takes a `String[]` array where each entry in the array is treated as a separate paragraph of discussion in the help output.

guide/annotations/group.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ title: Group Annotation
55

66
## `@Group`
77

8-
The `@Group` annotation is used to specify group information. This may be done as an alternative or in addition to using the relevant fields of the [`@Command`](command.html) or [`@Cli`](cli.html) annotations to specify groups.
8+
The `@Group` annotation is used to specify group information. This may be done as an alternative or in addition to using the relevant fields of the [`@Command`](command.html) or [`@Cli`](cli.html) annotations to specify groups.
9+
10+
**TODO Write up this annotation**

guide/annotations/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The following annotations are used to define the high level aspects of your CLIs
1515
- The [`@Option`](option.html) annotation defines fields of a class as denoting options
1616
- The [`@Arguments`](arguments.html) annotation defines a field of a class as denoting arguments
1717
- The [`@Cli`](cli.html) annotation defines a class as being a CLI which consists of potentially many commands
18+
- The [`@Group`](group.html) annotation defines a command group within a CLI
1819
- The [`@Parser`](parser.html) annotation defines the parser behaviour
1920
- The [`@DefaultOption`](default-option.html) annotation defines an `@Option` annotated field as being able to also be populated as if it were `@Arguments` annotated
2021

@@ -28,4 +29,6 @@ The following annotations are used to define various restrictions on options and
2829

2930
The following annotations are used to add additional help information to commands that may be consumed by the various help generators provided by Airline.
3031

31-
**TODO** - List help annotations
32+
**TODO** - List help annotations
33+
34+
- The [`@Discussion`](discussion.html) annotation adds extended discussion to an [`@Command`](command.html) annotated class

guide/annotations/parser.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ title: Parser Annotation
55

66
## `@Parser`
77

8-
The `@Parser` annotation is applied to classes also annotated with `@Command` to configure the parser behaviour for that single command. It may also be used as an argument to the `@Cli` annotation (see the [CLI Annotation](cli.html) documentation) in order to configure parser behaviour for a CLI.
8+
The `@Parser` annotation is applied to classes also annotated with `@Command` to configure the parser behaviour for that single command when parsers are created using `SingleCommand.singleCommand()`.
9+
10+
It may also be used as an argument to the [`@Cli`](cli.html) annotation in order to configure parser behaviour for a CLI.
11+
12+
**TODO Write up @Parser annotation**

guide/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ For a more complex CLI we need to use the [`@Cli`](annotations/cli.html) annotat
200200
commands = { GettingStarted.class, Tool.class })
201201
```
202202

203-
This states that our CLI has a `name` of `basic` and that it consists of two commands - `GettingStarted.class` and `Tool.class`. Each command itself needs to be appropriately defined with at minimum an `@Command` annotation as shown in the earlier `GettingStarted.java` example.
203+
This states that our CLI has a `name` of `basic` and that it consists of two commands - `GettingStarted.class` and `Tool.class`. Each command itself needs to be appropriately defined with at minimum a `@Command` annotation as shown in the earlier `GettingStarted.java` example.
204204

205205
We also specify that `GettingStarted.class` will serve as our `defaultCommand`, this specifies what the behaviour of our CLI is if a user does not explicitly provide the name of the command to be run.
206206

207+
**TODO Complete this example**

guide/parser/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ layout: page
33
title: Parsing
44
---
55

6-
The core of Airline is its parser which takes in string arguments passed into the JVM and turns that into a command instance with appropriately populated fields that your code can then use to actually run its intended function.
6+
The core of Airline is its parser which takes in string arguments passed into the JVM and turns that into a command instance with appropriately populated fields that your code can then use to actually run its intended function.
7+
8+
**TODO Document the parser**

guide/practise/oop.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ layout: page
33
title: Inheritance and Composition
44
---
55

6+
**TODO Document how inheritance and composition are used within Airline**

guide/practise/types.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ More generally Airline supports any Java class that meets one of the following c
4040

4141
Airline also supports any type which is a `Collection` of another supported type.
4242

43-
The advantage of using collection types e.g. `List<String>` is that your `@Option` or `@Arguments` annotated field stores all the values passed in. If your field has a non-collection type then only the last use of that option/argument will be stored in the final class that Airline creates.
43+
The advantage of using collection types e.g. `List<String>` is that your `@Option` or `@Arguments` annotated field stores all the values passed in. If your field has a non-collection type then only the last use of that option/argument will be stored in the final class that Airline creates.
44+
45+
## Custom Type Converters
46+
47+
**TODO Document creating custom type converters**

guide/restrictions/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ layout: page
33
title: Restrictions
44
---
55

6-
Airline includes a powerful and extensible restrictions system that allows users to significantly reduce the boiler plate code typical of many CLI libraries. Restrictions work by simply applying appropriate annotations to the `@Option` or `@Arguments` annotated fields that you wish to restrict and Airline handles all the work of enforcing those restrictions for you.
6+
Airline includes a powerful and extensible restrictions system that allows users to significantly reduce the boiler plate code typical of many CLI libraries. Restrictions work by simply applying appropriate annotations to the [`@Option`](../annotations/option.html) or [`@Arguments`](../annotations/arguments.html) annotated fields that you wish to restrict and Airline handles all the work of enforcing those restrictions for you.
77

88
**TODO** Simple restriction example
99

1010
## Available Restrictions
1111

1212
### Required Restrictions
1313

14+
**TODO List required restrictions**
1415

1516
### Value Restrictions
1617

18+
**TODO List value restrictions**
1719

18-
## Custom Restrictions
20+
## Custom Restrictions
21+
22+
**TODO Document creating custom restrictions**

0 commit comments

Comments
 (0)