equal
deleted
inserted
replaced
172 Rendering.Color.values.iterator.map(c => c -> color(c.toString + "_color")).toMap |
172 Rendering.Color.values.iterator.map(c => c -> color(c.toString + "_color")).toMap |
173 |
173 |
174 val main_color = jEdit.getColorProperty("view.fgColor") |
174 val main_color = jEdit.getColorProperty("view.fgColor") |
175 |
175 |
176 val outdated_color = color("outdated_color") |
176 val outdated_color = color("outdated_color") |
177 val unprocessed_color = color("unprocessed_color") |
|
178 val running_color = color("running_color") |
|
179 val bullet_color = color("bullet_color") |
177 val bullet_color = color("bullet_color") |
180 val tooltip_color = color("tooltip_color") |
178 val tooltip_color = color("tooltip_color") |
181 val warning_color = color("warning_color") |
|
182 val error_color = color("error_color") |
|
183 val spell_checker_color = color("spell_checker_color") |
179 val spell_checker_color = color("spell_checker_color") |
184 val entity_ref_color = color("entity_ref_color") |
180 val entity_ref_color = color("entity_ref_color") |
185 val breakpoint_disabled_color = color("breakpoint_disabled_color") |
181 val breakpoint_disabled_color = color("breakpoint_disabled_color") |
186 val breakpoint_enabled_color = color("breakpoint_enabled_color") |
182 val breakpoint_enabled_color = color("breakpoint_enabled_color") |
187 val caret_debugger_color = color("caret_debugger_color") |
183 val caret_debugger_color = color("caret_debugger_color") |
247 case st :: _ => Some((st.command, breakpoint)) |
243 case st :: _ => Some((st.command, breakpoint)) |
248 case _ => None |
244 case _ => None |
249 } |
245 } |
250 case _ => None |
246 case _ => None |
251 }).headOption.map(_.info) |
247 }).headOption.map(_.info) |
252 |
|
253 |
|
254 /* command status overview */ |
|
255 |
|
256 def overview_color(range: Text.Range): Option[Color] = |
|
257 { |
|
258 if (snapshot.is_outdated) None |
|
259 else { |
|
260 val results = |
|
261 snapshot.cumulate[List[Markup]](range, Nil, Protocol.liberal_status_elements, _ => |
|
262 { |
|
263 case (status, Text.Info(_, elem)) => Some(elem.markup :: status) |
|
264 }, status = true) |
|
265 if (results.isEmpty) None |
|
266 else { |
|
267 val status = Protocol.Status.make(results.iterator.flatMap(_.info)) |
|
268 |
|
269 if (status.is_running) Some(running_color) |
|
270 else if (status.is_failed) Some(error_color) |
|
271 else if (status.is_warned) Some(warning_color) |
|
272 else if (status.is_unprocessed) Some(unprocessed_color) |
|
273 else None |
|
274 } |
|
275 } |
|
276 } |
|
277 |
248 |
278 |
249 |
279 /* caret focus */ |
250 /* caret focus */ |
280 |
251 |
281 def entity_ref(range: Text.Range, focus: Set[Long]): List[Text.Info[Color]] = |
252 def entity_ref(range: Text.Range, focus: Set[Long]): List[Text.Info[Color]] = |