Skip to content

Commit

Permalink
layered: Report wrong graph configuration instead of fixing it. (#790)
Browse files Browse the repository at this point in the history
Signed-off-by: Soeren Domroes <sdo@informatik.uni-kiel.de>
  • Loading branch information
soerendomroes committed Mar 14, 2022
1 parent 6918787 commit 62534d5
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@
import org.eclipse.elk.alg.layered.options.GreedySwitchType;
import org.eclipse.elk.alg.layered.options.InternalProperties;
import org.eclipse.elk.alg.layered.options.LayeredOptions;
import org.eclipse.elk.core.UnsupportedGraphException;
import org.eclipse.elk.core.alg.ILayoutProcessor;
import org.eclipse.elk.core.math.KVector;
import org.eclipse.elk.core.options.ContentAlignment;
Expand Down Expand Up @@ -336,7 +337,8 @@ private void reviewAndCorrectHierarchicalProcessors(final LGraph root, final Col
CrossingMinimizationStrategy childCms =
child.getProperty(LayeredOptions.CROSSING_MINIMIZATION_STRATEGY);
if (childCms == CrossingMinimizationStrategy.LAYER_SWEEP) {
child.setProperty(LayeredOptions.CROSSING_MINIMIZATION_STRATEGY, parentCms);
throw new UnsupportedGraphException("The hierarchy aware processor " + childCms + " in child node "
+ child + " is only allowed if the root node specifies the same hierarchical processor.");
}
});
}
Expand Down

0 comments on commit 62534d5

Please sign in to comment.