Ugly fix for hyperlinking to Java from routes editor

This fixes the immediate problem, but it is not pretty.
Basically, a branch of the computation need to be done in the presentation compiler thread, while the other branch cannot. So I use the `Either` to carry the information of what still needs to be done.

I started to look at a solution not using the Java search, but Java model API does not behave exactly how I would like it too.