more robust Doc.view invocation: avoid executing process on GUI thread, but show errors as dialog;
--- a/src/Tools/jEdit/src/documentation_dockable.scala Tue Jun 25 17:14:50 2013 +0200
+++ b/src/Tools/jEdit/src/documentation_dockable.scala Tue Jun 25 19:13:37 2013 +0200
@@ -49,7 +49,14 @@
tree.getLastSelectedPathComponent match {
case node: DefaultMutableTreeNode =>
node.getUserObject match {
- case Documentation(name, _) => Doc.view(name)
+ case Documentation(name, _) =>
+ default_thread_pool.submit(() =>
+ try { Doc.view(name) }
+ catch {
+ case exn: Throwable =>
+ GUI.error_dialog(view,
+ "Documentation error", GUI.scrollable_text(Exn.message(exn)))
+ })
case _ =>
}
case _ =>