equal
deleted
inserted
replaced
146 private val block_size = 1024 |
146 private val block_size = 1024 |
147 } |
147 } |
148 |
148 |
149 final class Commands private(val commands: Linear_Set[Command]) |
149 final class Commands private(val commands: Linear_Set[Command]) |
150 { |
150 { |
|
151 lazy val thy_load_commands: List[Command] = |
|
152 commands.iterator.filter(_.thy_load.isDefined).toList |
|
153 |
151 private lazy val full_index: (Array[(Command, Text.Offset)], Text.Range) = |
154 private lazy val full_index: (Array[(Command, Text.Offset)], Text.Range) = |
152 { |
155 { |
153 val blocks = new mutable.ListBuffer[(Command, Text.Offset)] |
156 val blocks = new mutable.ListBuffer[(Command, Text.Offset)] |
154 var next_block = 0 |
157 var next_block = 0 |
155 var last_stop = 0 |
158 var last_stop = 0 |
195 perspective.required == other_perspective.required && |
198 perspective.required == other_perspective.required && |
196 perspective.visible.same(other_perspective.visible) && |
199 perspective.visible.same(other_perspective.visible) && |
197 perspective.overlays == other_perspective.overlays |
200 perspective.overlays == other_perspective.overlays |
198 |
201 |
199 def commands: Linear_Set[Command] = _commands.commands |
202 def commands: Linear_Set[Command] = _commands.commands |
|
203 def thy_load_commands: List[Command] = _commands.thy_load_commands |
200 |
204 |
201 def update_commands(new_commands: Linear_Set[Command]): Node = |
205 def update_commands(new_commands: Linear_Set[Command]): Node = |
202 if (new_commands eq _commands.commands) this |
206 if (new_commands eq _commands.commands) this |
203 else new Node(header, perspective, Node.Commands(new_commands)) |
207 else new Node(header, perspective, Node.Commands(new_commands)) |
204 |
208 |