package dfatool.views.graph;

import org.eclipse.zest.core.viewers.IGraphEntityContentProvider;
import org.eclipse.jface.viewers.ArrayContentProvider;

import dfatool.strategy.graph.NetworkNode;

public class NodesContentProvider extends ArrayContentProvider  implements IGraphEntityContentProvider {

		  @Override
		  public Object[] getConnectedTo(Object entity) {
		    if (entity instanceof NetworkNode) {
		    	NetworkNode node = (NetworkNode) entity;
		      return node.getZestConnections().toArray();
		    }
		    throw new RuntimeException("Type not supported");
		  }
		
}
