alexander.dymo at gmail.com
Sun Feb 21 19:53:28 UTC 2010
2010/2/21 Andreas Pakulat <apaku at gmx.de>:
> On 21.02.10 12:38:14, Alexander Dymo wrote:
>> SVN commit 1093771 by dymo:
>> Extend IRunController interface with two methods:
>> - launchConfigurations() to return the list of all configurations
>> - execute() to execute the given launch configuration
>> With these methods plugins can now create their own launch configurations
>> and execute them. This will be used in Ruby support to run current file.
> That was actually intentionally missing. Arbitrary plugins aren't
> supposed to create launch configs as most plugins simply don't have a
> clue how to setup a launch config. Whats the use-case for this? IMHO if
> ruby support wants to create a launch config to run a script it should
> use a method of the executescript plugin and that one should install a
> public interface header with that method in it.
Well, actually ruby plugin knows better how to execute the script.
In a simple case it's just ruby <filename.rb>,
but for executing test method it's ruby <filename.rb> -n <methodname>
I also can imagine myself adding launchers for:
- rake tasks (rake is an automation tool for ruby, used to build the
project, generate files, run tests, etc.)
- various rails-based scripts (to run benchmarks, generate code, etc.)
I used our launch framework for that instead of adding
IExecutePlugin::execute(program, args) for one reason: you sometimes
need to edit ruby arguments and set environment variables even to run
a current file. For example, I can have multiple ruby's installed
(need to edit $PATH) or I can have libs in specific dirs (additional
"-I" argument needed).
And our launch framework fits perfectly for this task, therefore I
reused it here.
More information about the KDevelop-devel