2 /*******************************************************************************
3 * Copyright (c) 2013 University of Stuttgart.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and the Apache License 2.0 which both accompany this distribution,
7 * and are available at http://www.eclipse.org/legal/epl-v10.html
8 * and http://www.apache.org/licenses/LICENSE-2.0
11 * Oliver Kopp - initial API and implementation and/or initial documentation
12 *******************************************************************************/
14 <%@tag description="Defines the javascript function createConnectorEndpoints globally. Quick hack to avoid huge hacking at the repository" pageEncoding="UTF-8"%>
16 <%@tag import="java.util.Collection"%>
17 <%@tag import="org.eclipse.winery.model.tosca.TRelationshipType"%>
18 <%@tag import="org.eclipse.winery.common.Util"%>
20 <%@attribute name="relationshipTypes" type="java.util.Collection" required="true" %>
23 function createConnectorEndpoints(nodeTemplateShapeSet) {
25 for (TRelationshipType relationshipType: (Collection<TRelationshipType>) relationshipTypes) {
27 nodeTemplateShapeSet.find(".<%=Util.makeCSSName(relationshipType.getTargetNamespace(), relationshipType.getName()) %>").each(function(i,e) {
28 var p = $(e).parent();
29 var grandparent = $(p).parent();
31 jsPlumb.makeSource($(e), {
34 connectionType: "{<%=relationshipType.getTargetNamespace()%>}<%=relationshipType.getName()%>",