EditorNode fromNode = (EditorNode) _netNodeList.get(fromName); EditorNode toNode = (EditorNode) _netNodeList.get(toName);
ModuleNode fromNode = (ModuleNode) _netNodeList.get(fromName); ModuleNode toNode = (ModuleNode) _netNodeList.get(toName);
    protected FigEdge handleEdge(Attributes attrs) {        String fromName = attrs.getValue("FromNode");        String toName = attrs.getValue("ToNode");        if (fromName == null || toName == null) {            System.out.println("In handleEdge, Names are null");            return null;        }        EditorNode fromNode = (EditorNode) _netNodeList.get(fromName);        EditorNode toNode = (EditorNode) _netNodeList.get(toName);        if (fromNode == null || toNode == null) {            System.out.println("In handleEdge, Nodes are null");            return null;        }        EditorFigNode fromFigNode = (EditorFigNode) _layer                .presentationFor(fromNode);        EditorFigNode toFigNode = (EditorFigNode) _layer.presentationFor(toNode);        if (fromFigNode == null || toFigNode == null) {            System.out.println("In handleEdge, FigNodes are null");        }        EditorPort fromPort = (EditorPort) fromNode.getPort();        EditorPort toPort = (EditorPort) toNode.getPort();        Fig fromPortFig = fromFigNode.getPortFig();        Fig toPortFig = toFigNode.getPortFig();        Object newEdge;        newEdge = _graphModel.connect(fromPort, toPort);        FigEdge fe = (FigEdge) _layer.presentationFor(newEdge);        fe.setSourcePortFig(fromPortFig);        fe.setSourceFigNode(fromFigNode);        fe.setDestPortFig(toPortFig);        fe.setDestFigNode(toFigNode);        String text = attrs.getValue("text");        if (text != null && fe instanceof EditorFigEdge) {            ((EditorFigEdge) fe).setText(text);        }        return fe;    }