class Syskit::GUI::ModelViews::TaskContextBase

Attributes

orogen_rendering[R]
task_model_view[R]

Public Class Methods

new(page) click to toggle source
Calls superclass method Syskit::GUI::ModelViews::Component.new
# File lib/syskit/gui/model_views/task_context_base.rb, line 7
def initialize(page)
    super(page)
    @task_model_view = Roby::GUI::ModelViews::Task.new(page)
    @orogen_rendering = OroGen::HTML::TaskContext.new(page)
    buttons = Array.new
    buttons.concat(self.class.common_graph_buttons('interface'))

    all_annotations = Syskit::Graphviz.available_task_annotations.sort
    buttons.concat(self.class.make_annotation_buttons('interface', all_annotations, all_annotations))
    Syskit::Graphviz.available_task_annotations.sort.each do |ann_name|
        interface_options[:annotations] << ann_name
    end
    interface_options[:buttons] = buttons
end

Public Instance Methods

render(model, external_objects: false) click to toggle source
# File lib/syskit/gui/model_views/task_context_base.rb, line 29
def render(model, external_objects: false)
    super

    page.push("oroGen Model", "<p><b>oroGen name:</b> #{model.orogen_model.name}</p>")
    orogen_rendering.render(model.orogen_model, external_objects: external_objects, doc: false)

    task_model_view.render(model, external_objects: external_objects)
end
render_doc(model) click to toggle source
# File lib/syskit/gui/model_views/task_context_base.rb, line 22
def render_doc(model)
    doc = [model.doc, model.orogen_model.doc].compact.join("\n\n").strip
    if !doc.empty?
        page.push nil, page.main_doc(doc)
    end
end