src/Pure/PIDE/resources.scala
changeset 65429 fcff401fb609
parent 65423 4527b33d5b3e
child 65439 862bfd2b4fd4
     1.1 --- a/src/Pure/PIDE/resources.scala	Fri Apr 07 15:53:06 2017 +0200
     1.2 +++ b/src/Pure/PIDE/resources.scala	Fri Apr 07 16:34:14 2017 +0200
     1.3 @@ -74,15 +74,14 @@
     1.4        if (Long_Name.is_qualified(theory0) || session_base.global_theories.contains(theory0)) theory0
     1.5        else Long_Name.qualify(session_name, theory0)
     1.6  
     1.7 -    session_base.known_theories.get(theory) orElse session_base.known_theories.get(theory0) match
     1.8 -    {
     1.9 -      case Some(name) =>
    1.10 -        if (session_base.loaded_theory(name)) name.loaded_theory else name
    1.11 -      case None =>
    1.12 -        val path = Path.explode(s)
    1.13 -        val node = append(dir, thy_path(path))
    1.14 -        val master_dir = append(dir, path.dir)
    1.15 -        Document.Node.Name(node, master_dir, theory)
    1.16 +    session_base.loaded_theories.get(theory) orElse
    1.17 +    session_base.loaded_theories.get(theory0) orElse
    1.18 +    session_base.known_theories.get(theory) orElse
    1.19 +    session_base.known_theories.get(theory0) getOrElse {
    1.20 +      val path = Path.explode(s)
    1.21 +      val node = append(dir, thy_path(path))
    1.22 +      val master_dir = append(dir, path.dir)
    1.23 +      Document.Node.Name(node, master_dir, theory)
    1.24      }
    1.25    }
    1.26