src/Tools/jEdit/src/plugin.scala
changeset 43661 39fdbd814c7f
parent 43648 e32de528b5ef
child 43670 7f933761764b
     1.1 --- a/src/Tools/jEdit/src/plugin.scala	Mon Jul 04 20:18:19 2011 +0200
     1.2 +++ b/src/Tools/jEdit/src/plugin.scala	Mon Jul 04 22:11:32 2011 +0200
     1.3 @@ -36,7 +36,6 @@
     1.4    /* plugin instance */
     1.5  
     1.6    var plugin: Plugin = null
     1.7 -  var system: Isabelle_System = null
     1.8    var session: Session = null
     1.9  
    1.10  
    1.11 @@ -200,7 +199,7 @@
    1.12            case Some(model) => Some(model)
    1.13            case None =>
    1.14              // FIXME strip protocol prefix of URL
    1.15 -            Thy_Header.split_thy_path(system.posix_path(buffer.getPath)) match {
    1.16 +            Thy_Header.split_thy_path(Isabelle_System.posix_path(buffer.getPath)) match {
    1.17                case Some((master_dir, thy_name)) =>
    1.18                  Some(Document_Model.init(session, buffer, master_dir, thy_name))
    1.19                case None => None
    1.20 @@ -274,9 +273,9 @@
    1.21  
    1.22    def default_logic(): String =
    1.23    {
    1.24 -    val logic = system.getenv("JEDIT_LOGIC")
    1.25 +    val logic = Isabelle_System.getenv("JEDIT_LOGIC")
    1.26      if (logic != "") logic
    1.27 -    else system.getenv_strict("ISABELLE_LOGIC")
    1.28 +    else Isabelle_System.getenv_strict("ISABELLE_LOGIC")
    1.29    }
    1.30  
    1.31    class Logic_Entry(val name: String, val description: String)
    1.32 @@ -288,7 +287,7 @@
    1.33    {
    1.34      val entries =
    1.35        new Logic_Entry("", "default (" + default_logic() + ")") ::
    1.36 -        system.find_logics().map(name => new Logic_Entry(name, name))
    1.37 +        Isabelle_System.find_logics().map(name => new Logic_Entry(name, name))
    1.38      val component = new ComboBox(entries)
    1.39      entries.find(_.name == logic) match {
    1.40        case None =>
    1.41 @@ -301,7 +300,7 @@
    1.42    def start_session()
    1.43    {
    1.44      val timeout = Time_Property("startup-timeout", Time.seconds(10)) max Time.seconds(5)
    1.45 -    val modes = system.getenv("JEDIT_PRINT_MODE").split(",").toList.map("-m" + _)
    1.46 +    val modes = Isabelle_System.getenv("JEDIT_PRINT_MODE").split(",").toList.map("-m" + _)
    1.47      val logic = {
    1.48        val logic = Property("logic")
    1.49        if (logic != null && logic != "") logic
    1.50 @@ -320,7 +319,7 @@
    1.51    {
    1.52      def read(path: Path): String =
    1.53      {
    1.54 -      val platform_path = Isabelle.system.platform_path(path)
    1.55 +      val platform_path = Isabelle_System.platform_path(path)
    1.56        val canonical_path = MiscUtilities.resolveSymlinks(platform_path)
    1.57  
    1.58        Isabelle.jedit_buffers().find(buffer =>
    1.59 @@ -405,10 +404,10 @@
    1.60    {
    1.61      Isabelle.plugin = this
    1.62      Isabelle.setup_tooltips()
    1.63 -    Isabelle.system = new Isabelle_System
    1.64 -    Isabelle.system.install_fonts()
    1.65 -    Isabelle.session = new Session(Isabelle.system, file_store)
    1.66 -    SyntaxUtilities.setStyleExtender(new Token_Markup.Style_Extender(Isabelle.system.symbols))
    1.67 +    Isabelle_System.init()
    1.68 +    Isabelle_System.install_fonts()
    1.69 +    Isabelle.session = new Session(file_store)
    1.70 +    SyntaxUtilities.setStyleExtender(new Token_Markup.Style_Extender)
    1.71      if (ModeProvider.instance.isInstanceOf[ModeProvider])
    1.72        ModeProvider.instance = new Token_Markup.Mode_Provider(ModeProvider.instance)
    1.73      Isabelle.session.phase_changed += session_manager