Module: Roby::GUI::TaskDisplayConfiguration
- Included in:
- RelationsCanvas
- Defined in:
- lib/roby/gui/task_display_configuration.rb
Instance Method Summary collapse
- #filter_prefixes(string) ⇒ Object
- #filtered_out_label?(label) ⇒ Boolean
-
#update_prefixes_removal ⇒ Object
Compute the prefixes to remove from in filter_prefixes: enable only the ones that are flagged, and sort them by prefix length.
Instance Method Details
#filter_prefixes(string) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/roby/gui/task_display_configuration.rb', line 24 def filter_prefixes(string) # @prefixes_removal is computed in RelationsCanvas#update for prefix in @prefixes_removal string = string.gsub(prefix, '') end if string =~ /^::/ string = string[2..-1] end string end |
#filtered_out_label?(label) ⇒ Boolean
20 21 22 |
# File 'lib/roby/gui/task_display_configuration.rb', line 20 def filtered_out_label?(label) (!hidden_labels.empty? && hidden_labels.any? { |match| label.include?(match) }) end |
#update_prefixes_removal ⇒ Object
Compute the prefixes to remove from in filter_prefixes: enable only the ones that are flagged, and sort them by prefix length
14 15 16 17 18 |
# File 'lib/roby/gui/task_display_configuration.rb', line 14 def update_prefixes_removal @prefixes_removal = removed_prefixes.to_a. sort_by { |p| p.length }. reverse end |