]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/modelingRules/CPTerminal.java
IConnectionPoint and canBeConnected-checking util to SCL
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / modelingRules / CPTerminal.java
index 68eec97358d0d1872de51b59674e49c379ace14b..9692b57870b53e8f6dc40bf319076034901c0de1 100644 (file)
@@ -56,4 +56,14 @@ public class CPTerminal implements IConnectionPoint {
         return (component == null ? other.component == null : component.equals(other.component)) && relation.equals(other.relation);
     }
 
         return (component == null ? other.component == null : component.equals(other.component)) && relation.equals(other.relation);
     }
 
+    /**
+     * Convenience method for SCL
+     * 
+     * @param component
+     * @param relation
+     * @return
+     */
+    public static IConnectionPoint makeIConnectionPoint(Resource component, Resource relation) {
+        return new CPTerminal(component, relation);
+    }
 }
 }