* to all exit sockets of the node the target socket belongs to)
* @param context Token context
*/
static void copySocketParameters(NodeSocket sourceSocket, NodeSocket targetSocket, TokenContext context)
{
Node node = sourceSocket.getNode();
// Iterate all parameters of the exit socket
for (Iterator itParam = sourceSocket.getParams(); itParam.hasNext();)
{
Param sourceParam = (Param) itParam.next();
String paramName = sourceParam.getName();
if (targetSocket != null)
{
Param targetParam = targetSocket.getParamByName(paramName);
if (targetParam == null)
continue;
Object value = TokenContextUtil.getParamValue(context, sourceParam);
TokenContextUtil.setParamValue(context, targetParam, value);
}
else
{
boolean haveValue = false;
Object value = null;
for (Iterator itSocket = node.getSockets(); itSocket.hasNext();)
{
NodeSocket socket = (NodeSocket) itSocket.next();
if (! socket.isExitSocket())
continue;