Skip to content

Commit f57aff1

Browse files
committed
Update JLine version references from 3.25.0 to 3.29.0
1 parent 57a5f32 commit f57aff1

16 files changed

+5909
-268
lines changed

jline-docs/docs/advanced/attributed-strings.md

Lines changed: 534 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/key-bindings.md

Lines changed: 510 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/library-integration.md

Lines changed: 837 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/mouse-support.md

Lines changed: 494 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/screen-clearing.md

Lines changed: 623 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/terminal-size.md

Lines changed: 732 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/unicode-support.md

Lines changed: 498 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/advanced/widgets.md

Lines changed: 848 additions & 0 deletions
Large diffs are not rendered by default.

jline-docs/docs/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add JLine to your project using Maven:
3030
<dependency>
3131
<groupId>org.jline</groupId>
3232
<artifactId>jline</artifactId>
33-
<version>3.25.0</version>
33+
<version>3.29.0</version>
3434
</dependency>
3535
```
3636

@@ -39,7 +39,7 @@ Add JLine to your project using Maven:
3939
Or if you're using Gradle:
4040

4141
```groovy
42-
implementation 'org.jline:jline:3.25.0'
42+
implementation 'org.jline:jline:3.29.0'
4343
```
4444

4545
## Basic Usage

jline-docs/docs/modules/builtins.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To use the builtins module, add the following dependency to your project:
1414
<dependency>
1515
<groupId>org.jline</groupId>
1616
<artifactId>jline-builtins</artifactId>
17-
<version>3.25.0</version>
17+
<version>3.29.0</version>
1818
</dependency>
1919
```
2020

@@ -43,20 +43,20 @@ public class FileOperationsExample {
4343
public static void main(String[] args) throws IOException {
4444
Terminal terminal = TerminalBuilder.builder().build();
4545
PrintWriter writer = terminal.writer();
46-
46+
4747
// Create a line reader with file operations completers
4848
LineReader reader = LineReaderBuilder.builder()
4949
.terminal(terminal)
5050
.completer(new ArgumentCompleter(
5151
new StringsCompleter("ls", "cat", "less"),
5252
new FilesCompleter(Paths.get("."))))
5353
.build();
54-
54+
5555
// Main command loop
5656
while (true) {
5757
String line = reader.readLine("builtin> ");
5858
String[] arguments = line.split("\\s+");
59-
59+
6060
try {
6161
if (arguments.length > 0) {
6262
switch (arguments[0]) {
@@ -67,7 +67,7 @@ public class FileOperationsExample {
6767
Commands.ls(terminal, writer, path, false, false, false, false);
6868
break;
6969
// highlight-end
70-
70+
7171
case "cat":
7272
// Display file contents
7373
if (arguments.length > 1) {
@@ -76,7 +76,7 @@ public class FileOperationsExample {
7676
writer.println("Usage: cat <file>");
7777
}
7878
break;
79-
79+
8080
case "less":
8181
// Display file contents with paging
8282
if (arguments.length > 1) {
@@ -85,10 +85,10 @@ public class FileOperationsExample {
8585
writer.println("Usage: less <file>");
8686
}
8787
break;
88-
88+
8989
case "exit":
9090
return;
91-
91+
9292
default:
9393
writer.println("Unknown command: " + arguments[0]);
9494
}
@@ -126,7 +126,7 @@ public class TableFormattingExample {
126126
public static void main(String[] args) throws IOException {
127127
Terminal terminal = TerminalBuilder.builder().build();
128128
PrintWriter writer = terminal.writer();
129-
129+
130130
// highlight-start
131131
// Define table columns
132132
List<Column> columns = Arrays.asList(
@@ -136,25 +136,25 @@ public class TableFormattingExample {
136136
new Column("Salary", ColumnType.Number)
137137
);
138138
// highlight-end
139-
139+
140140
// Create table data
141141
List<List<String>> data = new ArrayList<>();
142142
data.add(Arrays.asList("1", "John Doe", "Developer", "75000"));
143143
data.add(Arrays.asList("2", "Jane Smith", "Manager", "85000"));
144144
data.add(Arrays.asList("3", "Bob Johnson", "Designer", "65000"));
145-
145+
146146
// Print the table
147147
Tables.TableBuilder tableBuilder = new Tables.TableBuilder(columns);
148148
tableBuilder.addAll(data);
149-
149+
150150
// Format and display the table
151151
Tables.Table table = tableBuilder.build();
152152
String result = table.toStringWithColumns(
153-
terminal.getWidth(),
153+
terminal.getWidth(),
154154
true, // display borders
155155
true // display header
156156
);
157-
157+
158158
writer.println(result);
159159
writer.flush();
160160
}
@@ -183,25 +183,25 @@ public class WidgetsExample {
183183
public static void main(String[] args) throws IOException {
184184
Terminal terminal = TerminalBuilder.builder().build();
185185
DefaultParser parser = new DefaultParser();
186-
186+
187187
LineReader reader = LineReaderBuilder.builder()
188188
.terminal(terminal)
189189
.parser(parser)
190190
.build();
191-
191+
192192
// highlight-start
193193
// Create command descriptions for TailTip widget
194194
Map<String, List<String>> commandDescriptions = new HashMap<>();
195195
commandDescriptions.put("help", Arrays.asList("Display help information"));
196196
commandDescriptions.put("exit", Arrays.asList("Exit the application"));
197197
commandDescriptions.put("ls", Arrays.asList("[path]", "List directory contents"));
198198
commandDescriptions.put("cat", Arrays.asList("<file>", "Display file contents"));
199-
199+
200200
// Create and install the TailTip widget
201201
TailTipWidgets widgets = new TailTipWidgets(reader, commandDescriptions, 5, TipType.COMPLETER);
202202
widgets.enable();
203203
// highlight-end
204-
204+
205205
// Main command loop
206206
while (true) {
207207
String line = reader.readLine("widgets> ");
@@ -240,33 +240,33 @@ public class SystemRegistryExample {
240240
public static void main(String[] args) throws IOException {
241241
Terminal terminal = TerminalBuilder.builder().build();
242242
DefaultParser parser = new DefaultParser();
243-
243+
244244
// highlight-start
245245
// Create the registry
246246
SystemRegistry registry = new SystemRegistryImpl(parser, terminal, () -> Paths.get("."), null);
247-
247+
248248
// Create builtins
249249
Builtins builtins = new Builtins(registry::commandRegistry, () -> Paths.get("."), null, null);
250250
// highlight-end
251-
251+
252252
// Register commands
253253
registry.register("help", builtins::help);
254254
registry.register("ls", builtins::ls);
255255
registry.register("cat", builtins::cat);
256256
registry.register("less", builtins::less);
257-
257+
258258
// Set up completers
259259
SystemCompleter completer = builtins.compileCompleters();
260-
260+
261261
// Create line reader
262262
LineReader reader = LineReaderBuilder.builder()
263263
.terminal(terminal)
264264
.completer(completer)
265265
.parser(parser)
266266
.build();
267-
267+
268268
registry.setLineReader(reader);
269-
269+
270270
// Main command loop
271271
PrintWriter writer = terminal.writer();
272272
while (true) {
@@ -275,7 +275,7 @@ public class SystemRegistryExample {
275275
if (line.trim().equalsIgnoreCase("exit")) {
276276
break;
277277
}
278-
278+
279279
// Execute the command
280280
registry.execute(line);
281281
} catch (HelpException e) {
@@ -306,14 +306,14 @@ import java.nio.file.Paths;
306306
public class NanoEditorExample {
307307
public static void main(String[] args) throws IOException {
308308
Terminal terminal = TerminalBuilder.builder().build();
309-
309+
310310
// highlight-start
311311
// Configure Nano
312312
NanoConfig config = new NanoConfig.Builder()
313313
.tabSize(4)
314314
.tabToSpaces(true)
315315
.build();
316-
316+
317317
// Launch Nano editor
318318
Nano nano = new Nano(terminal, config);
319319
nano.open(Paths.get("example.txt"));

0 commit comments

Comments
 (0)