49 private val commands = new mutable.HashMap[IsarDocument.Command_ID, Command] with |
49 private val commands = new mutable.HashMap[IsarDocument.Command_ID, Command] with |
50 mutable.SynchronizedMap[IsarDocument.Command_ID, Command] |
50 mutable.SynchronizedMap[IsarDocument.Command_ID, Command] |
51 private var document_versions = List(ProofDocument.empty) |
51 private var document_versions = List(ProofDocument.empty) |
52 private val document_id0 = ProofDocument.empty.id |
52 private val document_id0 = ProofDocument.empty.id |
53 |
53 |
|
54 def command(id: IsarDocument.Command_ID): Option[Command] = commands.get(id) |
54 def document = document_versions.head |
55 def document = document_versions.head |
55 |
56 |
56 private var initialized = false |
57 private var initialized = false |
57 |
58 |
58 |
59 |
188 kind match { |
189 kind match { |
189 case Markup.ML_TYPING => |
190 case Markup.ML_TYPING => |
190 val info = body.first.asInstanceOf[XML.Text].content |
191 val info = body.first.asInstanceOf[XML.Text].content |
191 command.markup_root += command.markup_node(begin, end, TypeInfo(info)) |
192 command.markup_root += command.markup_node(begin, end, TypeInfo(info)) |
192 case Markup.ML_REF => |
193 case Markup.ML_REF => |
193 command.markup_root += command.markup_node(begin, end, RefInfo(body)) |
194 body match { |
|
195 case List(XML.Elem(Markup.ML_DEF, attr, _)) => |
|
196 command.markup_root += command.markup_node(begin, end, |
|
197 RefInfo(get_attr(attr, Markup.FILE), |
|
198 get_attr(attr, Markup.LINE).map(Integer.parseInt), |
|
199 get_attr(attr, Markup.ID), |
|
200 get_attr(attr, Markup.OFFSET).map(Integer.parseInt))) |
|
201 case _ => |
|
202 } |
194 case kind => |
203 case kind => |
195 if (!running) |
204 if (!running) |
196 commands.get(markup_id).map (cmd => |
205 commands.get(markup_id).map (cmd => |
197 cmd.markup_root += cmd.markup_node(begin, end, OuterInfo(kind))) |
206 cmd.markup_root += cmd.markup_node(begin, end, OuterInfo(kind))) |
198 else { |
207 else { |