From 4ef8eb59c717d8286e43c0bfc25dc1576d8c64b0 Mon Sep 17 00:00:00 2001 From: Soeren Domroes Date: Mon, 19 Aug 2024 13:09:31 +0200 Subject: [PATCH] Readded second node sorting. I could solve this maybe by doing the inversePortProcessor after this. --- .../alg/layered/intermediate/SortByInputModelProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java b/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java index ccaefbe2d..e4ef49bc3 100644 --- a/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java +++ b/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java @@ -82,6 +82,11 @@ public void process(final LGraph graph, final IElkProgressMonitor progressMonito progressMonitor.log("Node " + node + " ports: " + node.getPorts()); } } + // Sort nodes after port sorting to also sort dummy feedback nodes from the current layer correctly. + comparator = new ModelOrderNodeComparator(previousLayer, + graph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_STRATEGY), + graph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY)); + Collections.sort(layer.getNodes(), comparator); progressMonitor.log("Layer " + layerIndex + ": " + layer); layerIndex++;