lib/roby/log/dot.rb in roby-0.7.3 vs lib/roby/log/dot.rb in roby-0.8.0

- old
+ new

@@ -31,15 +31,15 @@ transactions.each do |trsc| trsc.to_dot(display, io, level + 1) end - relations_to_dot(display, io, TaskStructure, known_tasks) + relations_to_dot(display, io, Roby::Log::RelationsDisplay.all_task_relations, known_tasks) end - def each_displayed_relation(display, space, objects) - space.relations.each do |rel| + def each_displayed_relation(display, relations, objects) + relations.each do |rel| next unless display.relation_enabled?(rel) objects.each do |from| next unless display.displayed?(from) unless display[from] @@ -58,23 +58,23 @@ end end end end - def relations_to_dot(display, io, space, objects) - each_displayed_relation(display, space, objects) do |rel, from, to| + def relations_to_dot(display, io, all_relations, objects) + each_displayed_relation(display, all_relations, objects) do |rel, from, to| from_id, to_id = from.dot_id, to.dot_id if from_id && to_id io << " #{from_id} -> #{to_id}\n" else Roby::Log.warn "ignoring #{from}(#{from.object_id} #{from_id}) -> #{to}(#{to.object_id} #{to_id}) in #{rel} in #{caller(1).join("\n ")}" end end end - def layout_relations(positions, display, space, objects) - each_displayed_relation(display, space, objects) do |rel, from, to| + def layout_relations(positions, display, all_relations, objects) + each_displayed_relation(display, all_relations, objects) do |rel, from, to| display.task_relation(from, to, rel, from[to, rel]) end end # The distance from the root plan @@ -112,10 +112,10 @@ end transactions.each do |trsc| trsc.apply_layout(bounding_rects, positions, display, max_depth) end - layout_relations(positions, display, TaskStructure, known_tasks) + layout_relations(positions, display, Roby::Log::RelationsDisplay.all_task_relations, known_tasks) end end module LoggedPlanObject attr_reader :dot_id