--- a/src/Tools/jEdit/src/plugin.scala Wed Jun 22 20:56:18 2011 +0200
+++ b/src/Tools/jEdit/src/plugin.scala Wed Jun 22 21:27:20 2011 +0200
@@ -394,13 +394,15 @@
Isabelle.system.install_fonts()
Isabelle.session = new Session(Isabelle.system)
SyntaxUtilities.setStyleExtender(new Token_Markup.Style_Extender(Isabelle.system.symbols))
- ModeProvider.instance = new Token_Markup.Mode_Provider(ModeProvider.instance)
+ if (ModeProvider.instance.isInstanceOf[ModeProvider])
+ ModeProvider.instance = new Token_Markup.Mode_Provider(ModeProvider.instance)
Isabelle.session.phase_changed += session_manager
}
override def stop()
{
+ Isabelle.session.phase_changed -= session_manager
+ Isabelle.jedit_buffers.foreach(Isabelle.exit_model)
Isabelle.session.stop()
- Isabelle.session.phase_changed -= session_manager
}
}