177 Markup.TFREE -> "free type variable", |
177 Markup.TFREE -> "free type variable", |
178 Markup.TVAR -> "schematic type variable", |
178 Markup.TVAR -> "schematic type variable", |
179 Markup.ML_SOURCE -> "ML source", |
179 Markup.ML_SOURCE -> "ML source", |
180 Markup.DOC_SOURCE -> "document source") |
180 Markup.DOC_SOURCE -> "document source") |
181 |
181 |
|
182 private def string_of_typing(kind: String, body: XML.Body): String = |
|
183 Pretty.string_of(List(Pretty.block(XML.Text(kind) :: Pretty.Break(1) :: body)), |
|
184 margin = Isabelle.Int_Property("tooltip-margin")) |
|
185 |
182 val tooltip: Markup_Tree.Select[String] = |
186 val tooltip: Markup_Tree.Select[String] = |
183 { |
187 { |
184 case Text.Info(_, XML.Elem(Markup.Entity(kind, name), _)) => kind + " " + quote(name) |
188 case Text.Info(_, XML.Elem(Markup.Entity(kind, name), _)) => kind + " " + quote(name) |
185 case Text.Info(_, XML.Elem(Markup(Markup.ML_TYPING, _), body)) => |
189 case Text.Info(_, XML.Elem(Markup(Markup.TYPING, _), body)) => string_of_typing("::", body) |
186 Pretty.string_of(List(Pretty.block(XML.Text("ML:") :: Pretty.Break(1) :: body)), |
190 case Text.Info(_, XML.Elem(Markup(Markup.ML_TYPING, _), body)) => string_of_typing("ML:", body) |
187 margin = Isabelle.Int_Property("tooltip-margin")) |
|
188 case Text.Info(_, XML.Elem(Markup(name, _), _)) |
191 case Text.Info(_, XML.Elem(Markup(name, _), _)) |
189 if tooltips.isDefinedAt(name) => tooltips(name) |
192 if tooltips.isDefinedAt(name) => tooltips(name) |
190 } |
193 } |
191 |
194 |
192 private val subexp_include = |
195 private val subexp_include = |