equal
deleted
inserted
replaced
169 case dir if (dir + thy_file).is_file => file_node(dir + thy_file, theory = theory) }) |
169 case dir if (dir + thy_file).is_file => file_node(dir + thy_file, theory = theory) }) |
170 } |
170 } |
171 |
171 |
172 def import_name(qualifier: String, dir: String, s: String): Document.Node.Name = { |
172 def import_name(qualifier: String, dir: String, s: String): Document.Node.Name = { |
173 val theory = theory_name(qualifier, Thy_Header.import_name(s)) |
173 val theory = theory_name(qualifier, Thy_Header.import_name(s)) |
|
174 val literal_import = |
|
175 literal_theory(theory) && qualifier != sessions_structure.theory_qualifier(theory) |
|
176 if (literal_import && !Thy_Header.is_base_name(s)) { |
|
177 error("Bad import of theory from other session via file-path: " + quote(s)) |
|
178 } |
174 if (session_base.loaded_theory(theory)) loaded_theory_node(theory) |
179 if (session_base.loaded_theory(theory)) loaded_theory_node(theory) |
175 else { |
180 else { |
176 find_theory_node(theory) match { |
181 find_theory_node(theory) match { |
177 case Some(node_name) => node_name |
182 case Some(node_name) => node_name |
178 case None => |
183 case None => |