Execute required files in Ruby? [message #18377] |
Fri, 14 December 2007 21:17 |
Eclipse User |
|
|
|
Originally posted by: martin.thiede.gmx.de
Hello,
has anyone every thought about executing ruby code from required files
in DLTK, e.g. using JRuby?
Then not only methods derived by the parser could be provided for auto
completion, but also dynamically added methods as they are returned by
the Object#methods.
I'd also appreciate your answer if you know why this won't work or is
off topic for DLTK.
Kind regards,
Martin
|
|
|
Re: Execute required files in Ruby? [message #19244 is a reply to message #18377] |
Mon, 17 December 2007 06:12 |
Andrei Sobolev Messages: 72 Registered: July 2009 |
Member |
|
|
Hi Martin,
We have such functionality, we called it builtin modules.
We generate fake modules for builtin elements. They are available to explore from Interpreter Libraries/(builtins).
I've fixed JRuby builtin module retrieval code, so it will works to, thanks.
Fix will be available in next integration build.
Best regards,
Andrei.
> Hello,
>
> has anyone every thought about executing ruby code from required files
> in DLTK, e.g. using JRuby?
> Then not only methods derived by the parser could be provided for auto
> completion, but also dynamically added methods as they are returned by
> the Object#methods.
>
> I'd also appreciate your answer if you know why this won't work or is
> off topic for DLTK.
>
> Kind regards,
>
> Martin
|
|
|
Re: Execute required files in Ruby? [message #19387 is a reply to message #19244] |
Thu, 20 December 2007 22:22 |
Eclipse User |
|
|
|
Originally posted by: martin.thiede.gmx.de
Hello Andrei,
good to hear that you have a solution for my problem :o)
Unfortunately it doesn't seem to work. I tried it with the latest
integration build I200712200523 but without any success.
Here is my simple example:
In one file "SomeClass.rb" I have:
class SomeClass
define_method :cc do
puts "cc"
end
end
In another file I do:
require 'SomeClass'
o = SomeClass.new
o.<ctrl shift>
But it doesn't show me the "cc" method.
What am I doing wrong? Or do I have to configure something?
Best regards,
Martin
Andrei Sobolev schrieb:
> Hi Martin,
>
> We have such functionality, we called it builtin modules.
> We generate fake modules for builtin elements. They are available to explore from Interpreter Libraries/(builtins).
>
> I've fixed JRuby builtin module retrieval code, so it will works to, thanks.
>
> Fix will be available in next integration build.
>
> Best regards,
>
> Andrei.
>
>> Hello,
>>
>> has anyone every thought about executing ruby code from required files
>> in DLTK, e.g. using JRuby?
>> Then not only methods derived by the parser could be provided for auto
>> completion, but also dynamically added methods as they are returned by
>> the Object#methods.
>>
>> I'd also appreciate your answer if you know why this won't work or is
>> off topic for DLTK.
>>
>> Kind regards,
>>
>> Martin
|
|
|
Powered by
FUDForum. Page generated in 0.02589 seconds