gnodet-bot commented on code in PR #27560:
URL: https://github.com/apache/camel/pull/27560#discussion_r4217559487


##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/diagram/TopologyDiagramWidget.java:
##########
@@ -254,14 +277,119 @@ public void render(Rect area, Buffer buffer) {
         for (TopologyLayoutNode node : layout.nodes) {
             drawNode(buffer, area, node);
         }
+
+        if (errorLayer != null) {
+            drawErrorLabels(buffer, area);
+        }
+        drawErrorMarks(buffer, area);
+    }
+
+    /** A mark on the border of each route with error handling (shown in the 
frame, or hidden until x). */
+    private void drawErrorMarks(Buffer buffer, Rect area) {
+        for (TopologyLayoutNode node : layout.nodes) {
+            if (node.routeId != null && errorMarks.contains(node.routeId) && 
!inFrame(node)) {
+                int col = toCol(node.x) + boxWidth - 3;
+                writeText(buffer, area, toRow(node.y), col, "\u26a1", 
errorStyle().dim());
+            }
+        }
+    }
+
+    private Style errorStyle() {
+        return Theme.warning();
+    }
+
+    private boolean inFrame(TopologyLayoutNode node) {
+        return errorLayer != null && node.routeId != null && 
errorLayer.routeIds().contains(node.routeId);
+    }
+
+    private TopologyLayoutNode nodeOf(String routeId) {

Review Comment:
   🗑️ **Dead code:** `nodeOf()` is defined here but never called. No call site 
exists anywhere in the PR diff, and since the method is `private` it can only 
be used within this file — making it unreachable. Please remove it.



-- 
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