has there EVER been a case where a judge has ordered a software developer to do anything other than stop distributing their software (because of some copyright or patent issue) ?
Not AFAIK.
Usually it is tried at least somewhat surreptitiously, e.g.
Report of FBI back door roils OpenBSD community
http://news.cnet.com/8301-31921_3-20025767-281.html