src/Pure/Thy/thy_info.scala
changeset 66743 ff05d922bc34
parent 66719 d37efafd55b5
child 66775 e8f27a35ee0f
--- a/src/Pure/Thy/thy_info.scala	Sun Oct 01 16:56:47 2017 +0200
+++ b/src/Pure/Thy/thy_info.scala	Sun Oct 01 17:59:26 2017 +0200
@@ -66,6 +66,17 @@
           names.map(name => resources.loaded_files(loaded_theories.get_node(name.theory), name)))
     }
 
+    def imported_files: List[Path] =
+    {
+      val base = resources.session_base
+      val base_theories =
+        loaded_theories.all_preds(names.map(_.theory)).
+          filter(base.loaded_theories.defined(_))
+
+      base_theories.map(theory => base.known.theories(theory).path) :::
+      base_theories.flatMap(base.known.loaded_files(_))
+    }
+
     lazy val overall_syntax: Outer_Syntax =
       Outer_Syntax.merge(loaded_theories.maximals.map(loaded_theories.get_node(_)))