more operations;
authorwenzelm
Sat, 08 Apr 2017 12:47:34 +0200
changeset 65440 fd147f56d9be
parent 65439 862bfd2b4fd4
child 65441 9425e4d8bdb6
more operations;
src/Pure/General/long_name.scala
src/Pure/PIDE/document.scala
--- a/src/Pure/General/long_name.scala	Sat Apr 08 12:31:29 2017 +0200
+++ b/src/Pure/General/long_name.scala	Sat Apr 08 12:47:34 2017 +0200
@@ -21,6 +21,10 @@
     if (qual == "" || name == "") name
     else qual + separator + name
 
+  def qualifier(name: String): String =
+    if (name == "") ""
+    else implode(explode(name).dropRight(1))
+
   def base_name(name: String): String =
     if (name == "") ""
     else explode(name).last
--- a/src/Pure/PIDE/document.scala	Sat Apr 08 12:31:29 2017 +0200
+++ b/src/Pure/PIDE/document.scala	Sat Apr 08 12:47:34 2017 +0200
@@ -117,6 +117,7 @@
       def loaded_theory: Name = Name(theory, "", theory)
       def is_theory: Boolean = theory.nonEmpty
 
+      def theory_qualifier: String = Long_Name.qualifier(theory)
       def theory_base_name: String = Long_Name.base_name(theory)
 
       override def toString: String = if (is_theory) theory else node