src/Pure/PIDE/document.scala
changeset 44959 9476c856c4b9
parent 44957 098dd95349e7
child 44960 640c2b957f16
     1.1 --- a/src/Pure/PIDE/document.scala	Sat Sep 17 22:13:15 2011 +0200
     1.2 +++ b/src/Pure/PIDE/document.scala	Sat Sep 17 23:04:03 2011 +0200
     1.3 @@ -42,6 +42,13 @@
     1.4      object Name
     1.5      {
     1.6        val empty = Name("", "", "")
     1.7 +      def apply(path: Path): Name =
     1.8 +      {
     1.9 +        val node = path.implode
    1.10 +        val dir = path.dir.implode
    1.11 +        val theory = Thy_Header.thy_name(node) getOrElse error("Bad theory file name: " + path)
    1.12 +        Name(node, dir, theory)
    1.13 +      }
    1.14      }
    1.15      sealed case class Name(node: String, dir: String, theory: String)
    1.16      {