Class: Ruber::FilesRunner::ProjectWidget

Inherits:
ProjectConfigWidget show all
Defined in:
plugins/ruby_development/ruby_development.rb

Overview

Project configuration widget for the Files runner plugin

Instance Attribute Summary

Attributes inherited from ProjectConfigWidget

project

Instance Method Summary (collapse)

Constructor Details

- (ProjectWidget) initialize(prj)

A new instance of ProjectWidget

Parameters:



518
519
520
521
522
523
# File 'plugins/ruby_development/ruby_development.rb', line 518

def initialize prj
  super
  @ui = Ui::FilesRunnerProjectWidget.new
  @ui.setupUi self
  hide_global_only_widgets if prj.scope == :document
end

Instance Method Details

- (nil) hide_global_only_widgets (private)

Hides the widgets corresponding to global options

This method is called by the constructor when the widget is associated with a project with document scope.

Returns:

  • (nil)


553
554
555
556
557
558
# File 'plugins/ruby_development/ruby_development.rb', line 553

def hide_global_only_widgets
  @ui.main_program_label.hide
  @ui._ruby__main_program.hide
  @ui.working_dir_label.hide
  @ui._ruby__working_dir.hide
end

- (<String>) program_options

Splits the content of the program options widget into an array

execute. Quotes are preserved.

Returns:

  • (<String>)

    an array containing the options to pass to the ruby script to



540
541
542
# File 'plugins/ruby_development/ruby_development.rb', line 540

def program_options
  Shellwords.split_with_quotes @ui._ruby__options.text
end

- (Object) program_options=(value)

Sets the contents of the program options widget script to execute

Parameters:

  • value (<String>)

    a list of the command line options to be passed to the



530
531
532
# File 'plugins/ruby_development/ruby_development.rb', line 530

def program_options= value
  @ui._ruby__options.text = value.join " "
end