protected String getEdgeId(Object edge)
	{
		mxGraphView view = graph.getView();
		mxCellState state = view.getState(edge);
		Object src = (state != null) ? state.getVisibleTerminal(true) : view
				.getVisibleTerminal(edge, true);
		Object trg = (state != null) ? state.getVisibleTerminal(false) : view
				.getVisibleTerminal(edge, false);

		if (src instanceof mxICell && trg instanceof mxICell)
		{
			String srcId = mxCellPath.create((mxICell) src);
			String trgId = mxCellPath.create((mxICell) trg);

			return (srcId.compareTo(trgId) > 0) ? trgId + "-" + srcId : srcId
					+ "-" + trgId;
		}

		return null;
	}