equal
deleted
inserted
replaced
35 (_, name) <- (if (local) base.known.theories_local else base.known.theories).iterator |
35 (_, name) <- (if (local) base.known.theories_local else base.known.theories).iterator |
36 } yield name |
36 } yield name |
37 |
37 |
38 def local_theories_iterator = |
38 def local_theories_iterator = |
39 { |
39 { |
40 val local_path = local_dir.file.getCanonicalFile.toPath |
40 val local_path = local_dir.canonical_file.toPath |
41 theories.iterator.filter(name => |
41 theories.iterator.filter(name => |
42 Path.explode(name.node).file.getCanonicalFile.toPath.startsWith(local_path)) |
42 Path.explode(name.node).canonical_file.toPath.startsWith(local_path)) |
43 } |
43 } |
44 |
44 |
45 val known_theories = |
45 val known_theories = |
46 (Map.empty[String, Document.Node.Name] /: (bases_iterator(false) ++ theories.iterator))({ |
46 (Map.empty[String, Document.Node.Name] /: (bases_iterator(false) ++ theories.iterator))({ |
47 case (known, name) => |
47 case (known, name) => |
58 }) |
58 }) |
59 val known_files = |
59 val known_files = |
60 (Map.empty[JFile, List[Document.Node.Name]] /: |
60 (Map.empty[JFile, List[Document.Node.Name]] /: |
61 (bases_iterator(true) ++ bases_iterator(false) ++ theories.iterator))({ |
61 (bases_iterator(true) ++ bases_iterator(false) ++ theories.iterator))({ |
62 case (known, name) => |
62 case (known, name) => |
63 val file = Path.explode(name.node).file.getCanonicalFile |
63 val file = Path.explode(name.node).canonical_file |
64 val theories1 = known.getOrElse(file, Nil) |
64 val theories1 = known.getOrElse(file, Nil) |
65 if (theories1.exists(name1 => name.node == name1.node && name.theory == name1.theory)) |
65 if (theories1.exists(name1 => name.node == name1.node && name.theory == name1.theory)) |
66 known |
66 known |
67 else known + (file -> (name :: theories1)) |
67 else known + (file -> (name :: theories1)) |
68 }) |
68 }) |