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 e4ef49bc3..d40e04f94 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 @@ -65,7 +65,7 @@ public void process(final LGraph graph, final IElkProgressMonitor progressMonito ModelOrderNodeComparator 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); + SortByInputModelProcessor.insertionSort(layer.getNodes(), comparator); for (LNode node : layer.getNodes()) { if (node.getProperty(LayeredOptions.PORT_CONSTRAINTS) != PortConstraints.FIXED_ORDER && node.getProperty(LayeredOptions.PORT_CONSTRAINTS) != PortConstraints.FIXED_POS) { @@ -86,7 +86,7 @@ public void process(final LGraph graph, final IElkProgressMonitor progressMonito 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); + SortByInputModelProcessor.insertionSort(layer.getNodes(), comparator); progressMonitor.log("Layer " + layerIndex + ": " + layer); layerIndex++;