import org.simantics.diagram.connection.RouteTerminalPosition;
import org.simantics.diagram.connection.rendering.BasicConnectionStyle;
import org.simantics.diagram.connection.rendering.ConnectionStyle;
+import org.simantics.diagram.connection.rendering.ExampleConnectionStyle;
import org.simantics.diagram.connection.rendering.StyledRouteGraphRenderer;
import org.simantics.diagram.connection.rendering.arrows.ArrowLineEndStyle;
import org.simantics.diagram.connection.rendering.arrows.ILineEndStyle;
}
}
+ private static final ConnectionStyle DEFAULT_CONNECTION_STYLE = new ExampleConnectionStyle();
+
/**
* @param graph
* @param canvas
connectionType = modelingRules.getConnectionType(graph, connection);
if (connectionType == null)
connectionType = graph.getPossibleObject(connection, STR.HasConnectionType);
- return readConnectionStyleFromConnectionType(graph, connectionType);
+ return connectionType != null ? readConnectionStyleFromConnectionType(graph, connectionType) : DEFAULT_CONNECTION_STYLE;
}
protected static ConnectionStyle readConnectionStyleFromConnectionType(ReadGraph graph, Resource connectionType) throws DatabaseException {