class Syskit::GUI::ModelViews::Profile

Visualization of a syskit profile

Attributes

instanciation_method[RW]

Public Class Methods

new(page) click to toggle source
Calls superclass method
# File lib/syskit/gui/model_views/profile.rb, line 123
def initialize(page)
    super(page)
    @instanciation_method = :compute_system_network

    register_type Syskit::InstanceRequirements, ProfileElementView.new(page),
        method: :compute_system_network, show_requirements: true
end

Public Instance Methods

first_paragraph(string) click to toggle source
# File lib/syskit/gui/model_views/profile.rb, line 151
def first_paragraph(string)
    paragraph = String.new
    string.each_line do |line|
        line = line.chomp
        if line.empty?
            return paragraph
        else
            paragraph << " " << line
        end
    end
    paragraph
end
render(model, interactive: true, **push_options) click to toggle source
# File lib/syskit/gui/model_views/profile.rb, line 206
def render(model, interactive: true, **push_options)
    explicit_selections, default_selections, definitions, devices =
        compute_toplevel_links(model, interactive: interactive)

    ComponentNetworkBaseView.html_defined_in(page, model, with_require: true)
    render_links("Explicit Selection", explicit_selections)
    render_links("Default selections", default_selections)
    render_links("Definitions", definitions)
    render_links("Devices", devices)
    page.save

    if !interactive
        render_all_elements(explicit_selections + default_selections + definitions + devices,
            interactive: false, **push_options)
    end
end
render_object_as_text(model) click to toggle source
# File lib/syskit/gui/model_views/profile.rb, line 131
def render_object_as_text(model)
    render_instance_requirements(model.to_instance_requirements).join("\n")
end