*
* @param edge
*/
public void connect(DefaultEdge edge, boolean insertIntoCache)
{
Port source = (Port) edge.getSource();
Port target = (Port) edge.getTarget();
// TODO: move validation in Editor
if (isValidConnection(source, target))
{
source.addEdge(edge);
target.addEdge(edge);
// Use Edge to Connect Source and Target
ConnectionSet cs = new ConnectionSet(edge, source, target);
// Create a Map that holds the attributes for the edge
AttributeMap attr = edge.getAttributes();// GraphConstants.createMap();
// Construct a Map from cells to Maps (for insert)