This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 01926721ad97 CAMEL-23777: Move camel get route-dump to camel cmd
route-dump (#24059)
01926721ad97 is described below
commit 01926721ad97411d93e319357cc190da28172a3c
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Jun 16 20:36:00 2026 +0200
CAMEL-23777: Move camel get route-dump to camel cmd route-dump (#24059)
* chore: use Monokai color palette for TUI syntax highlighting
Replace ANSI colors with Monokai RGB true colors for better readability
on dark terminal backgrounds. The previous dark blue was unreadable on
black screens.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
* CAMEL-23777: Move camel get route-dump to camel cmd route-dump
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---------
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude <[email protected]>
---
.../ROOT/pages/camel-4x-upgrade-guide-4_21.adoc | 3 ++
...e-dump.adoc => camel-jbang-cmd-route-dump.adoc} | 4 +-
.../ROOT/pages/jbang-commands/camel-jbang-cmd.adoc | 1 +
.../ROOT/pages/jbang-commands/camel-jbang-get.adoc | 1 -
.../META-INF/camel-jbang-commands-metadata.json | 4 +-
.../dsl/jbang/core/commands/CamelJBangMain.java | 2 +-
.../jbang/core/commands/tui/SyntaxHighlighter.java | 53 +++++++++++++---------
.../core/commands/tui/SyntaxHighlighterTest.java | 20 ++++----
8 files changed, 50 insertions(+), 38 deletions(-)
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index 903886d1cd74..77d793d1cbc2 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -205,6 +205,9 @@ auto-disables `contentCache` on resource-based components
(such as `xslt`) whose
the route. Set `camel.component.<name>.contentCache=true` (or pass
`?contentCache=true` on the
URI) to opt back in to caching during dev mode.
+The `camel get route-dump` command has been moved to `camel cmd route-dump`,
grouping it with the other
+route action commands (`route-diagram`, `route-structure`, `route-topology`).
+
==== Container-optimized layered Docker packaging for `camel export`
The `camel export` command now generates Dockerfiles optimized for container
image layer caching
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route-dump.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd-route-dump.adoc
similarity index 93%
rename from
docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route-dump.adoc
rename to
docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd-route-dump.adoc
index 1cc3cc3622c9..08ca5b6a3967 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route-dump.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd-route-dump.adoc
@@ -1,6 +1,6 @@
// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
-= camel get route-dump
+= camel cmd route-dump
Dump Camel route in XML, YAML, or Java DSL format
@@ -9,7 +9,7 @@ Dump Camel route in XML, YAML, or Java DSL format
[source,bash]
----
-camel get route-dump [options]
+camel cmd route-dump [options]
----
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd.adoc
index 8687fdd9751c..b3e799143a74 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd.adoc
@@ -29,6 +29,7 @@ camel cmd [options]
| xref:jbang-commands/camel-jbang-cmd-reset-stats.adoc[reset-stats] | Reset
performance statistics
| xref:jbang-commands/camel-jbang-cmd-resume-route.adoc[resume-route] | Resume
Camel routes
| xref:jbang-commands/camel-jbang-cmd-route-diagram.adoc[route-diagram] |
Display Camel route diagram in the terminal
+| xref:jbang-commands/camel-jbang-cmd-route-dump.adoc[route-dump] | Dump Camel
route in XML, YAML, or Java DSL format
| xref:jbang-commands/camel-jbang-cmd-route-structure.adoc[route-structure] |
Dump Camel route structure
| xref:jbang-commands/camel-jbang-cmd-route-topology.adoc[route-topology] |
Display inter-route topology connections
| xref:jbang-commands/camel-jbang-cmd-send.adoc[send] | Send messages to
endpoints
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get.adoc
index e96ca2f286c1..3384abd60ecb 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get.adoc
@@ -42,7 +42,6 @@ camel get [options]
| xref:jbang-commands/camel-jbang-get-rest.adoc[rest] | Get REST services of
Camel integrations
| xref:jbang-commands/camel-jbang-get-route.adoc[route] | Get status of Camel
routes
| xref:jbang-commands/camel-jbang-get-route-controller.adoc[route-controller]
| List status of route controller
-| xref:jbang-commands/camel-jbang-get-route-dump.adoc[route-dump] | Dump Camel
route in XML, YAML, or Java DSL format
| xref:jbang-commands/camel-jbang-get-service.adoc[service] | Get services of
Camel integrations
| xref:jbang-commands/camel-jbang-get-source.adoc[source] | Display Camel
route source code
| xref:jbang-commands/camel-jbang-get-startup-recorder.adoc[startup-recorder]
| Display startup recording
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
index 0a818cf9c8f3..791f8dd75b40 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
+++
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
@@ -3,7 +3,7 @@
{ "name": "ask", "fullName": "ask", "description": "Ask a question about a
running Camel application using AI", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Ask", "options": [ { "names":
"--api-key", "description": "API key. Also reads ANTHROPIC_API_KEY,
OPENAI_API_KEY, or LLM_API_KEY env vars", "javaType": "java.lang.String",
"type": "string" }, { "names": "--api-type", "description": "API type:
'ollama', 'openai', or 'anthropic'", "javaType": "LlmClient.ApiType", "type"
[...]
{ "name": "bind", "fullName": "bind", "description": "DEPRECATED: Bind
source and sink Kamelets as a new Camel integration", "deprecated": true,
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.bind.Bind", "options":
[ { "names": "--error-handler", "description": "Add error handler
(none|log|sink:<endpoint>). Sink endpoints are expected in the format
[[apigroup\/]version:]kind:[namespace\/]name, plain Camel URIs or Kamelet
name.", "javaType": "java.lang.String", "type": "stri [...]
{ "name": "catalog", "fullName": "catalog", "description": "List artifacts
from Camel Catalog", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.catalog.CatalogCommand", "options": [
{ "names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name":
"component", "fullName": "catalog component", "description": "List components
from the Camel Catalog", "sourceClass": "org.apache.camel.dsl.jbang.co [...]
- { "name": "cmd", "fullName": "cmd", "description": "Performs commands in
the running Camel integrations, such as start\/stop route, or change logging
levels.", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.action.CamelAction", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name":
"browse", "fullName": "cmd browse", "description": "Browse pending messages on
endpoints [...]
+ { "name": "cmd", "fullName": "cmd", "description": "Performs commands in
the running Camel integrations, such as start\/stop route, or change logging
levels.", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.action.CamelAction", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name":
"browse", "fullName": "cmd browse", "description": "Browse pending messages on
endpoints [...]
{ "name": "completion", "fullName": "completion", "description": "Generate
completion script for bash\/zsh", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Complete", "options": [ { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ] },
{ "name": "config", "fullName": "config", "description": "Get and set user
configuration values", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.config.ConfigCommand", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "get",
"fullName": "config get", "description": "Display user configuration value",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.config. [...]
{ "name": "debug", "fullName": "debug", "description": "Debug local Camel
integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Debug",
"options": [ { "names": "--ago", "description": "Use ago instead of yyyy-MM-dd
HH:mm:ss in timestamp.", "javaType": "boolean", "type": "boolean" }, { "names":
"--background", "description": "Run in the background", "defaultValue":
"false", "javaType": "boolean", "type": "boolean" }, { "names":
"--background-wait", "description": "To [...]
@@ -15,7 +15,7 @@
{ "name": "eval", "fullName": "eval", "description": "Evaluate Camel
expressions and scripts", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.EvalCommand", "options": [ { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "expression",
"fullName": "eval expression", "description": "Evaluates Camel expression",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.EvalEx [...]
{ "name": "explain", "fullName": "explain", "description": "Explain what a
Camel route does using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Explain", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
ANTHROPIC_API_KEY, OPENAI_API_KEY, or LLM_API_KEY env vars", "javaType":
"java.lang.String", "type": "string" }, { "names": "--api-type", "description":
"API type: 'ollama', 'openai' (OpenAI-compatible), or 'anthropic' (A [...]
{ "name": "export", "fullName": "export", "description": "Export to other
runtimes (Camel Main, Spring Boot, or Quarkus)", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Export", "options": [ { "names":
"--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "ty [...]
- { "name": "get", "fullName": "get", "description": "Get status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelStatus", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "bean",
"fullName": "get [...]
+ { "name": "get", "fullName": "get", "description": "Get status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelStatus", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "bean",
"fullName": "get [...]
{ "name": "harden", "fullName": "harden", "description": "Suggest security
hardening for Camel routes using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Harden", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
OPENAI_API_KEY or LLM_API_KEY env vars", "javaType": "java.lang.String",
"type": "string" }, { "names": "--api-type", "description": "API type: 'ollama'
or 'openai' (OpenAI-compatible)", "defaultValue": "ollama", [...]
{ "name": "hawtio", "fullName": "hawtio", "description": "Launch Hawtio
web console", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.Hawtio", "options": [ {
"names": "--host", "description": "Hostname to bind the Hawtio web console to",
"defaultValue": "127.0.0.1", "javaType": "java.lang.String", "type": "string"
}, { "names": "--openUrl", "description": "To automatic open Hawtio web console
in the web browser", "defaultValue": "true", "javaType": "boolean", "type":
[...]
{ "name": "infra", "fullName": "infra", "description": "List and Run
external services for testing and prototyping", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.infra.InfraCommand", "options": [ {
"names": "--json", "description": "Output in JSON Format", "javaType":
"boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display
the help and sub-commands", "javaType": "boolean", "type": "boolean" } ],
"subcommands": [ { "name": "get", "fullName": "infra [...]
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
index 02e883ddda72..f0e26bd88823 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
@@ -117,6 +117,7 @@ public class CamelJBangMain implements Callable<Integer> {
.addSubcommand("reset-stats", new CommandLine(new
CamelResetStatsAction(this)))
.addSubcommand("resume-route", new CommandLine(new
CamelRouteResumeAction(this)))
.addSubcommand("route-diagram", new CommandLine(new
CamelRouteDiagramAction(this)))
+ .addSubcommand("route-dump", new CommandLine(new
CamelRouteDumpAction(this)))
.addSubcommand("route-structure", new CommandLine(new
CamelRouteStructureAction(this)))
.addSubcommand("route-topology", new CommandLine(new
CamelRouteTopologyAction(this)))
.addSubcommand("send", new CommandLine(new
CamelSendAction(this)))
@@ -175,7 +176,6 @@ public class CamelJBangMain implements Callable<Integer> {
.addSubcommand("rest", new CommandLine(new
ListRest(this)))
.addSubcommand("route", new CommandLine(new
CamelRouteStatus(this)))
.addSubcommand("route-controller", new CommandLine(new
RouteControllerAction(this)))
- .addSubcommand("route-dump", new CommandLine(new
CamelRouteDumpAction(this)))
.addSubcommand("service", new CommandLine(new
ListService(this)))
.addSubcommand("source", new CommandLine(new
CamelSourceAction(this)))
.addSubcommand("startup-recorder", new CommandLine(new
CamelStartupRecorderAction(this)))
diff --git
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighter.java
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighter.java
index 8859a18ba387..9ec9fc64923e 100644
---
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighter.java
+++
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighter.java
@@ -65,35 +65,44 @@ class SyntaxHighlighter {
private static final Pattern XML_ATTR_NAME =
Pattern.compile("\\s([\\w:.-]+)=");
private static final Pattern XML_ENTITY = Pattern.compile("&[^;]+;");
+ // Monokai color palette
+ static final Color MONOKAI_COMMENT = Color.rgb(117, 113, 94);
+ static final Color MONOKAI_STRING = Color.rgb(230, 219, 116);
+ static final Color MONOKAI_KEYWORD = Color.rgb(249, 38, 114);
+ static final Color MONOKAI_FUNCTION = Color.rgb(166, 226, 46);
+ static final Color MONOKAI_TYPE = Color.rgb(102, 217, 239);
+ static final Color MONOKAI_CONSTANT = Color.rgb(174, 129, 255);
+ static final Color MONOKAI_TEXT = Color.rgb(248, 248, 242);
+
// Java styles
- private static final Style JAVA_COMMENT_STYLE =
Style.EMPTY.fg(Color.LIGHT_BLUE);
- private static final Style JAVA_STRING_STYLE = Style.EMPTY.fg(Color.RED);
- private static final Style JAVA_ANNOTATION_STYLE =
Style.EMPTY.fg(Color.MAGENTA);
- private static final Style JAVA_MODIFIER_STYLE =
Style.EMPTY.fg(Color.CYAN);
- private static final Style JAVA_KEYWORD_STYLE = Style.EMPTY.fg(Color.RED);
- private static final Style JAVA_TYPE_STYLE = Style.EMPTY.fg(Color.GREEN);
- private static final Style JAVA_BOOLEAN_STYLE =
Style.EMPTY.fg(Color.YELLOW);
- private static final Style JAVA_NUMBER_STYLE =
Style.EMPTY.fg(Color.YELLOW);
+ private static final Style JAVA_COMMENT_STYLE =
Style.EMPTY.fg(MONOKAI_COMMENT);
+ private static final Style JAVA_STRING_STYLE =
Style.EMPTY.fg(MONOKAI_STRING);
+ private static final Style JAVA_ANNOTATION_STYLE =
Style.EMPTY.fg(MONOKAI_FUNCTION);
+ private static final Style JAVA_MODIFIER_STYLE =
Style.EMPTY.fg(MONOKAI_KEYWORD);
+ private static final Style JAVA_KEYWORD_STYLE =
Style.EMPTY.fg(MONOKAI_KEYWORD);
+ private static final Style JAVA_TYPE_STYLE = Style.EMPTY.fg(MONOKAI_TYPE);
+ private static final Style JAVA_BOOLEAN_STYLE =
Style.EMPTY.fg(MONOKAI_CONSTANT);
+ private static final Style JAVA_NUMBER_STYLE =
Style.EMPTY.fg(MONOKAI_CONSTANT);
// YAML styles
- private static final Style YAML_COMMENT_STYLE =
Style.EMPTY.fg(Color.LIGHT_BLUE);
- private static final Style YAML_KEY_STYLE = Style.EMPTY.fg(Color.RED);
- private static final Style YAML_VALUE_STYLE = Style.EMPTY.fg(Color.GREEN);
- private static final Style YAML_SPECIAL_STYLE =
Style.EMPTY.fg(Color.YELLOW);
- private static final Style YAML_SEPARATOR_STYLE =
Style.EMPTY.fg(Color.WHITE).bold();
+ private static final Style YAML_COMMENT_STYLE =
Style.EMPTY.fg(MONOKAI_COMMENT);
+ private static final Style YAML_KEY_STYLE =
Style.EMPTY.fg(MONOKAI_KEYWORD);
+ private static final Style YAML_VALUE_STYLE =
Style.EMPTY.fg(MONOKAI_STRING);
+ private static final Style YAML_SPECIAL_STYLE =
Style.EMPTY.fg(MONOKAI_CONSTANT);
+ private static final Style YAML_SEPARATOR_STYLE =
Style.EMPTY.fg(MONOKAI_TEXT).bold();
// XML styles
- private static final Style XML_COMMENT_STYLE =
Style.EMPTY.fg(Color.YELLOW);
- private static final Style XML_TAG_STYLE = Style.EMPTY.fg(Color.CYAN);
- private static final Style XML_ATTR_NAME_STYLE =
Style.EMPTY.fg(Color.MAGENTA);
- private static final Style XML_ATTR_VALUE_STYLE =
Style.EMPTY.fg(Color.GREEN);
- private static final Style XML_ENTITY_STYLE = Style.EMPTY.fg(Color.RED);
+ private static final Style XML_COMMENT_STYLE =
Style.EMPTY.fg(MONOKAI_COMMENT);
+ private static final Style XML_TAG_STYLE = Style.EMPTY.fg(MONOKAI_KEYWORD);
+ private static final Style XML_ATTR_NAME_STYLE =
Style.EMPTY.fg(MONOKAI_FUNCTION);
+ private static final Style XML_ATTR_VALUE_STYLE =
Style.EMPTY.fg(MONOKAI_STRING);
+ private static final Style XML_ENTITY_STYLE =
Style.EMPTY.fg(MONOKAI_CONSTANT);
// Properties styles
- private static final Style PROPERTIES_COMMENT_STYLE =
Style.EMPTY.fg(Color.LIGHT_BLUE);
- private static final Style PROPERTIES_KEY_STYLE =
Style.EMPTY.fg(Color.YELLOW);
- private static final Style PROPERTIES_SEPARATOR_STYLE =
Style.EMPTY.fg(Color.WHITE).bold();
- private static final Style PROPERTIES_VALUE_STYLE =
Style.EMPTY.fg(Color.BLUE);
+ private static final Style PROPERTIES_COMMENT_STYLE =
Style.EMPTY.fg(MONOKAI_COMMENT);
+ private static final Style PROPERTIES_KEY_STYLE =
Style.EMPTY.fg(MONOKAI_KEYWORD);
+ private static final Style PROPERTIES_SEPARATOR_STYLE =
Style.EMPTY.fg(MONOKAI_TEXT).bold();
+ private static final Style PROPERTIES_VALUE_STYLE =
Style.EMPTY.fg(MONOKAI_STRING);
private SyntaxHighlighter() {
}
diff --git
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighterTest.java
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighterTest.java
index addc69069c17..d060b58fdf27 100644
---
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighterTest.java
+++
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighterTest.java
@@ -41,9 +41,9 @@ class SyntaxHighlighterTest {
void colorsKeySeparatorAndValue() {
Line line = SyntaxHighlighter.highlightLine("camel.main.name=demo",
SyntaxHighlighter.Language.PROPERTIES);
- assertEquals(Color.YELLOW, fg(line, "camel.main.name"));
- assertEquals(Color.WHITE, fg(line, "="));
- assertEquals(Color.BLUE, fg(line, "demo"));
+ assertEquals(SyntaxHighlighter.MONOKAI_KEYWORD, fg(line,
"camel.main.name"));
+ assertEquals(SyntaxHighlighter.MONOKAI_TEXT, fg(line, "="));
+ assertEquals(SyntaxHighlighter.MONOKAI_STRING, fg(line, "demo"));
assertRoundTrip(line, "camel.main.name=demo");
}
@@ -51,9 +51,9 @@ class SyntaxHighlighterTest {
void colorsColonSeparatorWithSpaces() {
Line line = SyntaxHighlighter.highlightLine("server.port : 8080",
SyntaxHighlighter.Language.PROPERTIES);
- assertEquals(Color.YELLOW, fg(line, "server.port"));
- assertEquals(Color.WHITE, fg(line, ":"));
- assertEquals(Color.BLUE, fg(line, "8080"));
+ assertEquals(SyntaxHighlighter.MONOKAI_KEYWORD, fg(line,
"server.port"));
+ assertEquals(SyntaxHighlighter.MONOKAI_TEXT, fg(line, ":"));
+ assertEquals(SyntaxHighlighter.MONOKAI_STRING, fg(line, "8080"));
assertRoundTrip(line, "server.port : 8080");
}
@@ -61,7 +61,7 @@ class SyntaxHighlighterTest {
void colorsComments() {
for (String comment : new String[] { "# a hash comment", "! a bang
comment" }) {
Line line = SyntaxHighlighter.highlightLine(comment,
SyntaxHighlighter.Language.PROPERTIES);
- assertEquals(Color.LIGHT_BLUE, fg(line, comment));
+ assertEquals(SyntaxHighlighter.MONOKAI_COMMENT, fg(line, comment));
assertRoundTrip(line, comment);
}
}
@@ -69,7 +69,7 @@ class SyntaxHighlighterTest {
@Test
void colorsKeyWithoutValue() {
Line line = SyntaxHighlighter.highlightLine("enabled",
SyntaxHighlighter.Language.PROPERTIES);
- assertEquals(Color.YELLOW, fg(line, "enabled"));
+ assertEquals(SyntaxHighlighter.MONOKAI_KEYWORD, fg(line, "enabled"));
assertRoundTrip(line, "enabled");
}
@@ -78,8 +78,8 @@ class SyntaxHighlighterTest {
Line line = SyntaxHighlighter.highlightLine(" camel.x=1",
SyntaxHighlighter.Language.PROPERTIES);
// the indentation is emitted as a raw (unstyled) span
assertEquals(null, fg(line, " "));
- assertEquals(Color.YELLOW, fg(line, "camel.x"));
- assertEquals(Color.BLUE, fg(line, "1"));
+ assertEquals(SyntaxHighlighter.MONOKAI_KEYWORD, fg(line, "camel.x"));
+ assertEquals(SyntaxHighlighter.MONOKAI_STRING, fg(line, "1"));
assertRoundTrip(line, " camel.x=1");
}