Skip to content

Commit

Permalink
libavoid bug fixes (#956)
Browse files Browse the repository at this point in the history
* fixed id bug, moved hyperedges to normal options

* update libavoid server version

---------

Co-authored-by: Daniel Lindhuber <[email protected]>
  • Loading branch information
lindhuber and Daniel Lindhuber authored Sep 20, 2023
1 parent 8389811 commit cfc8845
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions plugins/org.eclipse.elk.alg.libavoid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.0/libavoid-server-linux</url>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.1/libavoid-server-linux</url>
<outputDirectory>${project.basedir}/libavoid-server</outputDirectory>
</configuration>
</execution>
Expand All @@ -73,7 +73,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.0/libavoid-server-macos</url>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.1/libavoid-server-macos</url>
<outputDirectory>${project.basedir}/libavoid-server</outputDirectory>
</configuration>
</execution>
Expand All @@ -84,7 +84,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.0/libavoid-server-win.exe</url>
<url>https://github.com/TypeFox/libavoid-server/releases/download/v0.3.1/libavoid-server-win.exe</url>
<outputDirectory>${project.basedir}/libavoid-server</outputDirectory>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ private void transformOptions(final ElkNode node) {
addOption(LibavoidOptions.DIRECTION, direction);
}

boolean enableHyperedgesFromCommonSource =
node.getProperty(LibavoidOptions.ENABLE_HYPEREDGES_FROM_COMMON_SOURCE);
addOption(LibavoidOptions.ENABLE_HYPEREDGES_FROM_COMMON_SOURCE,
enableHyperedgesFromCommonSource);

/*
* Penalties
*/
Expand Down Expand Up @@ -384,11 +389,6 @@ private void transformOptions(final ElkNode node) {
node.getProperty(LibavoidOptions.NUDGE_SHARED_PATHS_WITH_COMMON_END_POINT);
addRoutingOption(LibavoidOptions.NUDGE_SHARED_PATHS_WITH_COMMON_END_POINT,
nudgeSharedPathsWithCommonEndPoint);

boolean enableHyperedgesFromCommonSource =
node.getProperty(LibavoidOptions.ENABLE_HYPEREDGES_FROM_COMMON_SOURCE);
addRoutingOption(LibavoidOptions.ENABLE_HYPEREDGES_FROM_COMMON_SOURCE,
enableHyperedgesFromCommonSource);
}

private void addOption(final IProperty<?> key, final Object value) {
Expand Down Expand Up @@ -609,13 +609,14 @@ private void transformNode(final ElkNode node, final double x, final double y) {
libavoidNode(node, nodeIdCounter,
x, y, node.getWidth(), node.getHeight(),
portLessIncomingEdges, portLessOutgoingEdges);
nodeIdCounter++;

// transfer all ports
for (ElkPort port : node.getPorts()) {
libavoidPort(port, portIdCounter, nodeIdCounter, null);
portIdCounter++;
}

nodeIdCounter++;
}

/**
Expand Down

0 comments on commit cfc8845

Please sign in to comment.