src/Tools/jEdit/src/jedit_resources.scala
changeset 65472 f83081bcdd0e
parent 65471 05e5bffcf1d8
child 65476 a72ae9eb4462
     1.1 --- a/src/Tools/jEdit/src/jedit_resources.scala	Wed Apr 12 22:32:55 2017 +0200
     1.2 +++ b/src/Tools/jEdit/src/jedit_resources.scala	Wed Apr 12 22:47:21 2017 +0200
     1.3 @@ -29,9 +29,12 @@
     1.4    {
     1.5      val vfs = VFSManager.getVFSForPath(path)
     1.6      val node = if (vfs.isInstanceOf[FileVFS]) MiscUtilities.resolveSymlinks(path) else path
     1.7 -    val (loaded, theory) = theory_name(default_qualifier, Thy_Header.theory_name(node))
     1.8 -    if (loaded) Document.Node.Name.loaded_theory(theory)
     1.9 -    else Document.Node.Name(node, if (theory == "") "" else vfs.getParentOfPath(path), theory)
    1.10 +    loaded_theory_name(default_qualifier, Thy_Header.theory_name(node)) match {
    1.11 +      case (true, theory) => Document.Node.Name.loaded_theory(theory)
    1.12 +      case (false, theory) =>
    1.13 +        val master_dir = if (theory == "") "" else vfs.getParentOfPath(path)
    1.14 +        Document.Node.Name(node, master_dir, theory)
    1.15 +    }
    1.16    }
    1.17  
    1.18    def node_name(buffer: Buffer): Document.Node.Name =