RubyMine extension for Rio can not work!

I have write an extension for Rio,  code as following:

[code]

def register_rio_types()
  describe 'Kernel' do
    set_return_type "rio" => "RIO::Rio"
  end
  describe 'RIO::Rio' do
    set_return_type "files" => "RIO::Rio"
  end
end

register_rio_types

[code]

The code completion can work for rio("oooo").files("pppp").<caret>, please take a look the attachment. I made a mistake?



Attachment(s):
rio.png
0

Another question is about block variable, and I have following code:

rio('public/statics/images/chiling').each do |f|

   f.<caret>

end

Can I write extensions to make code completion for 'f' variable?  Thanks.

0

Sorry, I make a mistake, the correct code as following:

describe "RIO::IF::GrandeEntry" do
    set_return_type "files" => "RIO::Rio"
  end

But question is how to implement code completion for block variable.

0

Hello,

But question is how to implement code completion for block variable.

Should be

.... describe "RIO::IF::Grande" do   set_block_variable_type "each" => "String" end



Thus whole extension is:

require "code_insight/code_insight_helper" describe 'Kernel' do     set_return_type "rio" => "RIO::Rio" end describe "RIO::IF::GrandeEntry" do   set_return_type "files" => "RIO::Rio" end describe "RIO::IF::Grande" do   set_block_variable_type "each" => "String" end



By some reason in this "set_block_variable_type" doesn't work in my RubyMine 2.0 I will investigate it later to day.
0

Thanks.  I have issued this problem to YouTrack.  http://youtrack.jetbrains.net/issue/RUBY-5570

0

Fix will be available in 2.0.1 update

0

It can not work for me with following code in 2.0.1, and can you make it work?  Screenshot will be  great

rio("d:").each do |file|
puts file.<caret>
end

I can not get "filename" in the popup menu.

0

Screenshot =)
Screen shot 2010-01-19 at 2.29.58 PM.png
But unfortunately you are right I also cannot make it working, although it worked in past. By I a mistake this cucumber test was removed from our build configuration and probably somebody broke my fix. I've reopened the issue.

0

Screen shot 2010-02-09 at 4.16.31 PM.png
Fix will be available in coming RubyMine 2.0.2 update

0

请先登录再写评论。