imagej/imagej — pull request #20 by dscho (2014-02-24 21:03:01+00:00)
Title: Fix Fiji's modern mode

After `Help>Switch to Modern Mode` the class loader was not set properly. As a consequence, plugins were discovered correctly only they were contained in `.jar` files that just so happened to be in the class path of `fiji-compat`.

Fix this by explicitly setting Thread's context class loader to the correct class loader when

1. creating the `Context`.
2. running the *Switch to Modern Mode* plugin on the *Event Dispatch Thread*.

We need to do both because the `ThreadService` reuses threads and they can be created from either call path.