107 val light_color = color_value("light_color") |
107 val light_color = color_value("light_color") |
108 val writeln_color = color_value("writeln_color") |
108 val writeln_color = color_value("writeln_color") |
109 val warning_color = color_value("warning_color") |
109 val warning_color = color_value("warning_color") |
110 val error_color = color_value("error_color") |
110 val error_color = color_value("error_color") |
111 val error1_color = color_value("error1_color") |
111 val error1_color = color_value("error1_color") |
|
112 val message_color = color_value("message_color") |
112 val writeln_message_color = color_value("writeln_message_color") |
113 val writeln_message_color = color_value("writeln_message_color") |
113 val tracing_message_color = color_value("tracing_message_color") |
114 val tracing_message_color = color_value("tracing_message_color") |
114 val warning_message_color = color_value("warning_message_color") |
115 val warning_message_color = color_value("warning_message_color") |
115 val error_message_color = color_value("error_message_color") |
116 val error_message_color = color_value("error_message_color") |
116 val bad_color = color_value("bad_color") |
117 val bad_color = color_value("bad_color") |
352 Text.Info(r, pri) <- results |
353 Text.Info(r, pri) <- results |
353 color <- squiggly_colors.get(pri) |
354 color <- squiggly_colors.get(pri) |
354 } yield Text.Info(r, color) |
355 } yield Text.Info(r, color) |
355 } |
356 } |
356 |
357 |
|
358 def line_background(range: Text.Range): Option[(Color, Boolean)] = |
|
359 { |
|
360 val messages = |
|
361 Set(Isabelle_Markup.WRITELN_MESSAGE, Isabelle_Markup.WARNING_MESSAGE, |
|
362 Isabelle_Markup.ERROR_MESSAGE) |
|
363 val is_message = |
|
364 snapshot.cumulate_markup[Boolean](range, false, Some(messages), |
|
365 { |
|
366 case (_, Text.Info(_, XML.Elem(Markup(name, _), body))) if messages(name) => true |
|
367 }).exists(_.info) |
|
368 val is_separator = is_message && |
|
369 snapshot.cumulate_markup[Boolean](range, false, |
|
370 Some(Set(Isabelle_Markup.SEPARATOR)), |
|
371 { |
|
372 case (_, Text.Info(_, XML.Elem(Markup(Isabelle_Markup.SEPARATOR, _), _))) => true |
|
373 }).exists(_.info) |
|
374 |
|
375 if (is_message) Some((message_color, is_separator)) else None |
|
376 } |
357 |
377 |
358 def background1(range: Text.Range): Stream[Text.Info[Color]] = |
378 def background1(range: Text.Range): Stream[Text.Info[Color]] = |
359 { |
379 { |
360 if (snapshot.is_outdated) Stream(Text.Info(range, outdated_color)) |
380 if (snapshot.is_outdated) Stream(Text.Info(range, outdated_color)) |
361 else |
381 else |