def convert(edit_name: String, edit: Text.Edit): Pos = { if (name == edit_name) { val offset1 = edit.convert(offset) if (offset == offset1) thiselse Pos.make(name, offset1)
} elsethis
}
}
object History { val limit: Int = 500 val empty: History = new History(Linear_Set.empty)
}
class History(hist: Linear_Set[Pos]) { overridedef toString: String =
size match { case 0 => "History.empty" case n => "History(" + n + ")"
} def is_empty: Boolean = hist.isEmpty def size: Int = hist.size def iterator: Iterator[Pos] = hist.iterator
def top: Pos = if (hist.isEmpty) Pos.none else hist.head def pop: History = if (hist.isEmpty) thiselsenew History(hist.delete_after(None))
def push(pos: Pos): History = if (!pos.defined || pos.equiv(top)) this else { val hist1 = if (hist.size < History.limit) hist else hist.delete_after(hist.prev(hist.last)) new History(hist1.insert_after(None, pos))
}
def convert(name: String, edit: Text.Edit): History = new History(
hist.foldLeft(hist) { case (h, pos) => val prev = h.prev(pos) val pos0 = prev.getOrElse(Pos.none) val pos1 = pos.convert(name, edit) if (pos1.equiv(pos0)) h.delete_after(prev) elseif (pos1.equiv(pos)) h else h.delete_after(prev).insert_after(prev, pos1)
}
)
def close(names: Set[String]): History = new History(
hist.foldLeft(hist) { case (h, pos) => val prev = h.prev(pos) val pos0 = prev.getOrElse(Pos.none) if (names.contains(pos.name) || pos.equiv(pos0)) h.delete_after(prev) else h
}
)
}
finalclass State private[Isabelle_Navigator](view: View) {
}
}
class Isabelle_Navigator {
// owned by GUI thread privatevar _bypass = false privatevar _backward = Isabelle_Navigator.History.empty privatevar _forward = Isabelle_Navigator.History.empty
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.