davsclaus commented on code in PR #27715:
URL: https://github.com/apache/camel/pull/27715#discussion_r4248001241


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/TransformJavaRoutes.java:
##########
@@ -111,7 +175,20 @@ static Result transform(List<String> files, String format, 
String output, boolea
             dumper.setOutput(output);
             dumper.dumpRoutes(format);
         }
-        return new Result(true, null);
+    }
+
+    /** Sets the source location of the node and its children (the line 
numbers the parser has set already). */
+    private static void locate(NamedNode node, String location) {
+        if (node.getLocation() == null) {
+            node.setLocation(location);
+        }
+        if (node instanceof RouteDefinition route && route.getInput() != null) 
{
+            route.getInput().setLocation(location);

Review Comment:
   Applied in 5a09f99dd308: the input keeps a location the parser has set, as 
the other nodes do.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to